Explorar el Código

BUG #1555 计量台账-删除设计数量1(合同、变更),经济指标应清空

MaiXinRong hace 7 años
padre
commit
72220bdc64
Se han modificado 2 ficheros con 9 adiciones y 2 borrados
  1. 3 1
      DataModules/BillsMeasureDm.pas
  2. 6 1
      Frames/BillsMeasureFme.pas

+ 3 - 1
DataModules/BillsMeasureDm.pas

@@ -946,7 +946,9 @@ begin
     fDividend := ValueByName('AddGatherTotalPrice').AsFloat;
     fDivisor := ValueByName('DealDgnQuantity1').AsFloat + ValueByName('CDgnQuantity1').AsFloat;
     if fDivisor <> 0 then
-      ValueByName('AddDgnPrice').AsFloat := AdvRoundTo(fDividend/fDivisor);
+      ValueByName('AddDgnPrice').AsFloat := AdvRoundTo(fDividend/fDivisor)
+    else
+      ValueByName('AddDgnPrice').Clear;
   end;
 end;
 

+ 6 - 1
Frames/BillsMeasureFme.pas

@@ -450,7 +450,12 @@ begin
 
   if (ssCtrl in Shift) and (ssShift in Shift) and (ssAlt in Shift)
       and (Key in [67, 99]) then // 'c', 'C'
-    actnCalculateAll.Execute;
+  begin
+    if _IsDebugView then
+      TProjectData(FBillsMeasureData.ProjectData).CalculateAll
+    else
+      actnCalculateAll.Execute;
+  end;
 
   if (ssCtrl in Shift) and (ssShift in Shift) and (ssAlt in Shift)
       and (Key in [66, 98]) then