From 03f93088637930acbda3cd0b405114e0b00c13e4 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期一, 30 九月 2024 17:29:00 +0800
Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev

---
 _Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl b/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
index dcd3b98..ba8dd8d 100644
--- a/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
+++ b/_Main/BL/Type_FinancialWeeklyReport/StaticMethod_Initialize.qbl
@@ -44,38 +44,38 @@
     ccsvaluecumulant          := [Real]0;
     
     traverse( table, FinancialWeeklyColumn, column ){
-      productioncolumn      := selectobject( productiontable, FinancialProductionColumn, pcolumn, pcolumn.Name() = column.Name() and pcolumn.Period() = column.Period() );
-      salescolumn           := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() );
+      productioncolumn      := selectobject( productiontable, FinancialProductionColumn, pcolumn, pcolumn.Name() = column.Name() and pcolumn.Period() = column.Period() and not pcolumn.IsDay() );
+      salescolumn           := selectobject( salestable, FinancialSalesColumn, scolumn, scolumn.Name() = column.Name() and scolumn.Period() = column.Period() and not scolumn.IsDay() );
       
       //浜ч噺姹囨��
       totalpvalue           := [Real]0;
       dlpvalue              := [Real]0;
       ccpvalue              := [Real]0;
-      traverse( productioncolumn, FinancialProductionCell, cell, [Real]cell.Value() > 0 ){
+      traverse( productioncolumn, FinancialProductionCell, cell, cell.Quantity() > 0 ){
         unit                := cell.FinancialProductionRow().Unit();
         
         if( unit = allunit ){
-          totalpvalue       := totalpvalue + [Real]cell.Value();
+          totalpvalue       := totalpvalue + cell.Quantity();
           if( column.Period() = startofplanning.StartOfMonth().Date() ){
             totalpvaluecumulant := totalpvaluecumulant - cell.PlanValue();
           }
         }else if( unit = dlunit ){
-          dlpvalue          := dlpvalue + [Real]cell.Value();
+          dlpvalue          := dlpvalue + cell.Quantity();
           if( column.Period() = startofplanning.StartOfMonth().Date() ){
             dlpvaluecumulant := dlpvaluecumulant - cell.PlanValue();
           }
         }else if( unit = ccunit ){
-          ccpvalue          := ccpvalue + [Real]cell.Value();
+          ccpvalue          := ccpvalue + cell.Quantity();
           if( column.Period() = startofplanning.StartOfMonth().Date() ){
             ccpvaluecumulant := ccpvaluecumulant - cell.PlanValue();
           }
         }
       }
-      totalpcell            := column.FinancialWeeklyCell( relnew, Value := [String]totalpvalue );
+      totalpcell            := column.FinancialWeeklyCell( relnew, Value := [String]( [Number]totalpvalue ) );
       totalproduction.FinancialWeeklyCell( relinsert, totalpcell );
-      dlpcell               := column.FinancialWeeklyCell( relnew, Value := [String]dlpvalue );
+      dlpcell               := column.FinancialWeeklyCell( relnew, Value := [String]( [Number]dlpvalue ) );
       dlproduction.FinancialWeeklyCell( relinsert, dlpcell );
-      ccpcell               := column.FinancialWeeklyCell( relnew, Value := [String]ccpvalue );
+      ccpcell               := column.FinancialWeeklyCell( relnew, Value := [String]( [Number]ccpvalue ) );
       ccproduction.FinancialWeeklyCell( relinsert, ccpcell );
       
       //閿�閲忔眹鎬�

--
Gitblit v1.9.3