Browse Source

更新Bills中的GclDeal字段前,先清空一次

MaiXinRong 9 years ago
parent
commit
0d951efc54
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Units/ProjectData.pas

+ 2 - 0
Units/ProjectData.pas

@@ -995,10 +995,12 @@ procedure TProjectData.CopyPhaseData;
 
   procedure UpdateBillsByDealBills;
   const
+    sClearSql = 'Update Bills Set GclDealQuantity = 0 GclDealTotalPrice = 0';
     sUpdateSql = 'Update Bills As B, DealBills As D' +
                  '    Set B.GclDealQuantity = D.Quantity, B.GclDealTotalPrice = D.TotalPrice' +
                  '  Where (B.B_Code = D.B_Code) and (B.Name = D.Name) and (B.Units = D.Units) and (B.Price = D.Price)';
   begin
+    ExecuteSql(sClearSql);
     ExecuteSql(sUpdateSql);
   end;