Browse Source

新增P_ZJJL_DetailBills便于报表查询数据

MaiXinRong 7 years ago
parent
commit
28dee7b4d0
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Units/ProjectData.pas

+ 8 - 0
Units/ProjectData.pas

@@ -904,6 +904,14 @@ procedure TProjectData.CopyPhaseData;
             '  From Bills As B, P_Stage As PS, P_ZJJL As PZ' +
             '  Where (PZ.BillsID = B.LeafXmjParentID) And (B.ID = PS.BillsID) And (B.IsLeaf=True)';
     ExecuteSql(sSql);
+    sSql := 'Select PZD.ID, PZD.BillsID, B.Quantity As Quantity,' +
+            '    PS.GatherQuantity As GatherQuantity, PS.GatherTotalPrice As GatherTotalPrice,' +
+            '    PS.PreGatherQuantity As PreGatherQuantity, PS.GatherTotalPrice As PreGatherTotalPrice,' +
+            '    PS.EndGatherQuantity As EndGatherQuantity, PS.GatherTotalPrice As EndGatherTotalPrice' +
+            '  Into P_ZJJL_DetailBills' +
+            '  From Bills As B, P_Stage As PS, P_ZJJL_Detail As PZD' +
+            '  Where (PZD.BillsID = PS.BillsID) And (B.ID = PZD.BillsID)';
+    ExecuteSql(sSql);
   end;
 
   procedure CopyZJJLData(const AFileName: string);