bug fixed

This commit is contained in:
kamonwan taengsuk
2023-03-28 15:31:38 +07:00
parent 0c4712eaba
commit 0e59f3c39c

View File

@@ -150,22 +150,29 @@ namespace rmutr_report.Controllers
boqPrice.list = str.Insert(i, ","); boqPrice.list = str.Insert(i, ",");
} }
} }
else if (str.Length == 8) else if (str.Length == 7)
{ {
// boqPrice.list.Replace("10000000", "10,000,000"); for (int i = 4; i <= str.Length - 1; i += 7)
// boqPrice.list.Replace("10000000.0000", "10,000,000");
for (int i = 2; i <= str.Length - 1; i += 8)
{ {
boqPrice.list = str.Insert(i, ","); boqPrice.list = str.Insert(i, ",");
}
}
// else if (str.Length == 8)
// {
// // boqPrice.list.Replace("10000000", "10,000,000");
// // boqPrice.list.Replace("10000000.0000", "10,000,000");
// for (int i = 2; i <= str.Length - 1; i += 8)
// {
// boqPrice.list = str.Insert(i, ","); // boqPrice.list = str.Insert(i, ",");
} // //boqPrice.list = str.Insert(i, ",");
// }
for (int i = 5; i <= str.Length - 1; i += 8) //
{ // for (int i = 5; i <= str.Length - 1; i += 8)
boqPrice.list = str.Insert(i, ","); // {
// boqPrice.list = str.Insert(i, ","); // boqPrice.list = str.Insert(i, ",");
} // //boqPrice.list = str.Insert(i, ",");
} // }
// }
if (boqPrice.list == "10000000") if (boqPrice.list == "10000000")
{ {
@@ -210,26 +217,34 @@ namespace rmutr_report.Controllers
boqPrice.have = str.Insert(i, ","); boqPrice.have = str.Insert(i, ",");
} }
} }
else if (str.Length == 8) else if (str.Length == 7)
{ {
// boqPrice.have.Replace("10000000", "10,000,000"); for (int i = 1; i <= str.Length - 1; i += 7)
// boqPrice.have.Replace("10000000.0000", "10,000,000");
for (int i = 2; i <= str.Length - 1; i += 8)
{ {
boqPrice.have = str.Insert(i, ","); boqPrice.have = str.Insert(i, ",");
//boqPrice.have = str.Insert(i, ",");
} }
for (int i = 5; i <= str.Length - 1; i += 8)
{
boqPrice.have = str.Insert(i, ",");
//boqPrice.list = str.Insert(i, ",");
} }
// else if (str.Length == 8)
// {
// // boqPrice.have.Replace("10000000", "10,000,000");
// // boqPrice.have.Replace("10000000.0000", "10,000,000");
// for (int i = 2; i <= str.Length - 1; i += 8)
// {
// boqPrice.have = str.Insert(i, ",");
// //boqPrice.have = str.Insert(i, ",");
// }
// //
// boqPrice.have.Replace("10000000", "10,000,000"); // for (int i = 5; i <= str.Length - 1; i += 8)
// boqPrice.have.Replace("10000000.0000", "10,000,000"); // {
// // boqPrice.have = str.Insert(i, ",");
} // //boqPrice.list = str.Insert(i, ",");
// }
// //
// // boqPrice.have.Replace("10000000", "10,000,000");
// // boqPrice.have.Replace("10000000.0000", "10,000,000");
// //
// }
if (boqPrice.have == "10000000") if (boqPrice.have == "10000000")
{ {
boqPrice.have = "10,000,000"; boqPrice.have = "10,000,000";