구매율에서 비구매 수량 제외

This commit is contained in:
chi
2022-10-17 10:55:55 +09:00
parent ed8858439e
commit 6b42127361
3 changed files with 16 additions and 13 deletions

View File

@@ -526,7 +526,9 @@ namespace FPJ0000
var dr = drv.Row as dsPRJ.ProjectsRow;
this.label1.Text = string.Format("[{0}] {1}", dr.name, dr.memo);
var sql = "select ((sum((case when isnull(qtybuy,0) = isnull(qtyin,0) then 1 else 0 end))*1.0) / count(*))*100 from ProjectsPart where project = " + dr.idx.ToString();
var sql = "select ((sum((case when isnull(qtybuy,0) = isnull(qtyin,0) then 1 else 0 end))*1.0) / count(*))*100 " +
$" from ProjectsPart where project = {dr.idx}" +
$" and isnull(qtybuy,0) <> 0";
var stR_result = FCOMMON.DBM.ExecuteScalar(sql);
if (string.IsNullOrEmpty(stR_result))
{