PhasePayDm.pas 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. unit PhasePayDm;
  2. interface
  3. uses
  4. SysUtils, Classes, sdDB, sdProvider, ADODB, FormulaCalc, CalcDecimal;
  5. type
  6. TPhasePayData = class(TDataModule)
  7. sdpPhasePay: TsdADOProvider;
  8. sddPhasePay: TsdDataSet;
  9. procedure sddPhasePayBeforeValueChange(AValue: TsdValue;
  10. const NewValue: Variant; var Allow: Boolean);
  11. procedure sddPhasePayAfterValueChanged(AValue: TsdValue);
  12. private
  13. FPhaseData: TObject;
  14. FPayFormula: TPayFormula;
  15. FBeforeChangeTotalPrice: Double;
  16. FDecimal: TCalcDecimal;
  17. function CheckMinus(AID: Integer): Boolean;
  18. function GetFormula(AID: Integer): string;
  19. function GetCalcType(AID: Integer): Integer;
  20. function GetName(AID: Integer): string;
  21. function GetPayablePrice(AIndex: Integer): Double;
  22. procedure RepairPhaseRecord;
  23. procedure BeforeBatchOperation;
  24. procedure AfterBatchOperation;
  25. function GetCurPayable: Double;
  26. function GetLastestPhasePay(AType: Integer): Double;
  27. procedure SetFieldValidChar;
  28. function GetBqwc(AType: Integer): Double;
  29. function GetTableName: string;
  30. public
  31. constructor Create(APhaseData: TObject);
  32. destructor Destroy; override;
  33. procedure Open(AConnection: TADOConnection);
  34. procedure Save;
  35. function AddPayRecord(AID: Integer): TsdDataRecord;
  36. function PayRecord(AID: Integer): TsdDataRecord;
  37. procedure Delete(AID: Integer);
  38. procedure CalculateAll;
  39. procedure Calculate(AID: Integer);
  40. procedure CalculateCurPay;
  41. procedure UpdateDataForNewAudit;
  42. procedure CopyPrePhasePayData; overload;
  43. procedure CopyPrePhasePayData(const APreFile: string; APreFinalIndex: Integer); overload;
  44. property TableName: string read GetTableName;
  45. property PayablePrice[AIndex: Integer]: Double read GetPayablePrice;
  46. // 本期应付
  47. property CurPayable: Double read GetCurPayable;
  48. // AType表示不同类型,取值如下:
  49. // 1: 本期数据 2: 截止本期数据 3: 截止上期数据
  50. property LastestPhasePay[AType: Integer]: Double read GetLastestPhasePay;
  51. property Bqwc[AType: Integer]: Double read GetBqwc;
  52. property Decimal: TCalcDecimal read FDecimal;
  53. end;
  54. implementation
  55. uses
  56. PhaseData, ProjectData, DealPaymentDm, BillsDm, ConstUnit, UtilMethods;
  57. {$R *.dfm}
  58. { TPhasePayData }
  59. constructor TPhasePayData.Create(APhaseData: TObject);
  60. begin
  61. inherited Create(nil);
  62. FPhaseData := APhaseData;
  63. FPayFormula := TPayFormula.Create(TPhaseData(FPhaseData).ProjectData);
  64. with TProjectData(TPhaseData(FPhaseData).ProjectData) do
  65. begin
  66. FPayFormula.Decimal := ProjProperties.DecimalManager.DealPay;
  67. FDecimal := ProjProperties.DecimalManager.DealPay;
  68. end;
  69. end;
  70. procedure TPhasePayData.Delete(AID: Integer);
  71. begin
  72. sddPhasePay.Remove(sddPhasePay.FindKey('idxID', AID));
  73. end;
  74. destructor TPhasePayData.Destroy;
  75. begin
  76. FPayFormula.Free;
  77. inherited;
  78. end;
  79. procedure TPhasePayData.UpdateDataForNewAudit;
  80. var
  81. iNewAudit, iIndex: Integer;
  82. Rec: TsdDataRecord;
  83. begin
  84. BeforeBatchOperation;
  85. try
  86. iNewAudit := TPhaseData(FPhaseData).PhaseProperty.AuditCount;
  87. for iIndex := 0 to sddPhasePay.RecordCount - 1 do
  88. begin
  89. Rec := sddPhasePay.Records[iIndex];
  90. Rec.ValueByName('TotalPrice' + IntToStr(iNewAudit)).AsString :=
  91. Rec.ValueByName('TotalPrice' + IntToStr(iNewAudit - 1)).AsString;
  92. Rec.ValueByName('Formula' + IntToStr(iNewAudit)).AsString :=
  93. Rec.ValueByName('Formula' + IntToStr(iNewAudit - 1)).AsString;
  94. Rec.ValueByName('EndTotalPrice' + IntToStr(iNewAudit)).AsString :=
  95. Rec.ValueByName('EndTotalPrice' + IntToStr(iNewAudit - 1)).AsString;
  96. Rec.ValueByName('PreTotalPrice' + IntToStr(iNewAudit)).AsString :=
  97. Rec.ValueByName('PreTotalPrice' + IntToStr(iNewAudit - 1)).AsString;
  98. end;
  99. finally
  100. AfterBatchOperation;
  101. end;
  102. end;
  103. procedure TPhasePayData.Open(AConnection: TADOConnection);
  104. begin
  105. sdpPhasePay.Connection := AConnection;
  106. sddPhasePay.Open;
  107. if not Assigned(sddPhasePay.IndexList.FindByName('idxID')) then
  108. sddPhasePay.AddIndex('idxID', 'ID');
  109. SetFieldValidChar;
  110. // 为适应旧项目处不计算合同支付值所做修改。
  111. if sddPhasePay.RecordCount = 0 then
  112. begin
  113. CopyPrePhasePayData;
  114. CalculateAll;
  115. end;
  116. end;
  117. procedure TPhasePayData.Save;
  118. begin
  119. sddPhasePay.Save;
  120. end;
  121. function TPhasePayData.AddPayRecord(AID: Integer): TsdDataRecord;
  122. begin
  123. Result := sddPhasePay.Add;
  124. Result.ValueByName('ID').AsInteger := AID;
  125. end;
  126. procedure TPhasePayData.sddPhasePayBeforeValueChange(AValue: TsdValue;
  127. const NewValue: Variant; var Allow: Boolean);
  128. begin
  129. if not Assigned(AValue) then Exit;
  130. if Pos('TotalPrice', AValue.FieldName) = 1 then
  131. FBeforeChangeTotalPrice := AValue.AsFloat;
  132. end;
  133. procedure TPhasePayData.sddPhasePayAfterValueChanged(AValue: TsdValue);
  134. begin
  135. if Pos('TotalPrice', AValue.FieldName) = 1 then
  136. begin
  137. AValue.Owner.ValueByName('End' + AValue.FieldName).AsFloat := AValue.AsFloat
  138. + AValue.Owner.ValueByName('Pre' + AValue.FieldName).AsFloat;
  139. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  140. UpdateTotalPrice(AValue.Owner.ValueByName('ID').AsInteger, AValue.AsFloat - FBeforeChangeTotalPrice);
  141. end;
  142. CalculateCurPay;
  143. end;
  144. procedure TPhasePayData.CalculateAll;
  145. var
  146. iIndex: Integer;
  147. Rec: TsdDataRecord;
  148. begin
  149. if TPhaseData(FPhaseData).StageDataReadOnly then Exit;
  150. RepairPhaseRecord;
  151. for iIndex := 0 to sddPhasePay.RecordCount - 1 do
  152. begin
  153. Rec := sddPhasePay.Records[iIndex];
  154. if GetCalcType(Rec.ValueByName('ID').AsInteger) in [0, 3] then
  155. Calculate(Rec.ValueByName('ID').AsInteger);
  156. end;
  157. CalculateCurPay;
  158. end;
  159. procedure TPhasePayData.Calculate(AID: Integer);
  160. var
  161. Rec: TsdDataRecord;
  162. // 金额列名, 公式列名
  163. sTPField, sFField, sPreField: string;
  164. iID: Integer;
  165. fTotalPrice, fStartedPrice: Double;
  166. begin
  167. Rec := sddPhasePay.FindKey('idxID', AID);
  168. sTPField := 'TotalPrice' + IntToStr(TPhaseData(FPhaseData).StageIndex);
  169. sFField := 'Formula' + IntToStr(TPhaseData(FPhaseData).StageIndex);
  170. sPreField := 'PreTotalPrice' + IntToStr(TPhaseData(FPhaseData).StageIndex);
  171. if not Rec.ValueByName('StopCalc').AsBoolean then
  172. begin
  173. iID := Rec.ValueByName('ID').AsInteger;
  174. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  175. begin
  176. // 获取起扣金额
  177. fStartedPrice := GetStartedPrice(iID);
  178. if Rec.ValueByName(sFField).AsString <> '' then
  179. begin
  180. // 初次达到起扣金额时,bqwc基数值取值为累计完成计量-起扣金额
  181. if FDecimal.TotalPrice.RoundTo(Rec.ValueByName('Pre'+sTPField).AsFloat) = 0 then
  182. fTotalPrice := FPayFormula.Calculate(Rec.ValueByName(sFField).AsString, fStartedPrice)
  183. else
  184. fTotalPrice := FPayFormula.Calculate(Rec.ValueByName(sFField).AsString);
  185. end
  186. else
  187. fTotalPrice := 0;
  188. if CheckStartedPrice(iID) then
  189. Rec.ValueByName(sTPField).AsFloat := GetAllowTotalPrice(iID, fTotalPrice, Rec.ValueByName(sPreField).AsFloat)
  190. else
  191. Rec.ValueByName(sTPField).AsFloat := 0;
  192. end;
  193. end
  194. else
  195. Rec.ValueByName(sTPField).AsFloat := 0;
  196. {if Rec.ValueByName(sFField).AsString <> '' then
  197. begin
  198. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  199. begin
  200. iID := Rec.ValueByName('ID').AsInteger;
  201. // 获取起扣金额
  202. fStartedPrice := GetStartedPrice(iID);
  203. // 初次达到起扣金额时,bqwc基数值取值为累计完成计量-起扣金额
  204. if Rec.ValueByName('Pre'+sTPField).AsFloat = 0 then
  205. fTotalPrice := FPayFormula.Calculate(Rec.ValueByName(sFField).AsString, fStartedPrice)
  206. else
  207. fTotalPrice := FPayFormula.Calculate(Rec.ValueByName(sFField).AsString);
  208. if CheckStartedPrice(iID) then
  209. Rec.ValueByName(sTPField).AsFloat := GetAllowTotalPrice(iID, fTotalPrice, Rec.ValueByName(sPreField).AsFloat)
  210. else
  211. Rec.ValueByName(sTPField).AsFloat := 0;
  212. end;
  213. end;}
  214. // 计算截止数据
  215. Rec.ValueByName('End' + sTPField).AsFloat := FDecimal.TotalPrice.RoundTo(Rec.ValueByName(sTPField).AsFloat
  216. + Rec.ValueByName('Pre' + sTPField).AsFloat);
  217. with TProjectData(TPhaseData(FPhaseData).ProjectData) do
  218. if StageDataReadOnly then
  219. DealPaymentData.SetTotalPrice(AID, Rec.ValueByName('End' + sTPField).AsFloat);
  220. end;
  221. function TPhasePayData.GetPayablePrice(AIndex: Integer): Double;
  222. var
  223. iIndex: Integer;
  224. sTotalPriceField: string;
  225. Rec: TsdDataRecord;
  226. begin
  227. Result := 0;
  228. // 阶段在0--14之间
  229. if (AIndex < 0) or (AIndex > iMaxStageCount-1) then Exit;
  230. sTotalPriceField := 'TotalPrice' + IntToStr(AIndex);
  231. for iIndex := 0 to sddPhasePay.RecordCount - 1 do
  232. begin
  233. Rec := sddPhasePay.Records[iIndex];
  234. if CheckMinus(Rec.ValueByName('ID').AsInteger) then
  235. Result := Result - Rec.ValueByName(sTotalPriceField).AsFloat
  236. else
  237. Result := Result + Rec.ValueByName(sTotalPriceField).AsFloat;
  238. end;
  239. end;
  240. function TPhasePayData.CheckMinus(AID: Integer): Boolean;
  241. begin
  242. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  243. Result := sddDealPayment.FindKey('idxID', AID).ValueByName('IsMinus').AsBoolean;
  244. end;
  245. function TPhasePayData.GetFormula(AID: Integer): string;
  246. begin
  247. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  248. Result := sddDealPayment.FindKey('idxID', AID).ValueByName('Formula').AsString;
  249. end;
  250. procedure TPhasePayData.AfterBatchOperation;
  251. begin
  252. sddPhasePay.BeforeValueChange := sddPhasePayBeforeValueChange;
  253. sddPhasePay.AfterValueChanged := sddPhasePayAfterValueChanged;
  254. sddPhasePay.EndUpdate;
  255. end;
  256. procedure TPhasePayData.BeforeBatchOperation;
  257. begin
  258. sddPhasePay.BeginUpdate;
  259. sddPhasePay.BeforeValueChange := nil;
  260. sddPhasePay.AfterValueChanged := nil;
  261. end;
  262. procedure TPhasePayData.CalculateCurPay;
  263. var
  264. Rec: TsdDataRecord;
  265. sTPField: string;
  266. I: Integer;
  267. begin
  268. sTPField := 'TotalPrice' + IntToStr(TPhaseData(FPhaseData).StageIndex);
  269. for I := 0 to sddPhasePay.RecordCount - 1 do
  270. begin
  271. Rec := sddPhasePay.Records[I];
  272. if GetCalcType(Rec.ValueByName('ID').AsInteger) = 1 then
  273. begin
  274. Rec.ValueByName(sTPField).AsFloat := CurPayable;
  275. Rec.ValueByName('End' + sTPField).AsFloat := Rec.ValueByName(sTPField).AsFloat
  276. + Rec.ValueByName('Pre' + sTPField).AsFloat;
  277. Break;
  278. end;
  279. end;
  280. end;
  281. function TPhasePayData.GetCurPayable: Double;
  282. var
  283. Rec: TsdDataRecord;
  284. sTPField: string;
  285. i: Integer;
  286. begin
  287. sTPField := 'TotalPrice' + IntToStr(TPhaseData(FPhaseData).StageIndex);
  288. Result := 0;
  289. for I := 0 to sddPhasePay.RecordCount - 1 do
  290. begin
  291. Rec := sddPhasePay.Records[I];
  292. // 检查是否为一般项
  293. if GetCalcType(Rec.ValueByName('ID').AsInteger) = 0 then
  294. if CheckMinus(Rec.ValueByName('ID').AsInteger) then
  295. Result := Result - Rec.ValueByName(sTPField).AsFloat
  296. else
  297. Result := Result + Rec.ValueByName(sTPField).AsFloat;
  298. end;
  299. end;
  300. function TPhasePayData.GetCalcType(AID: Integer): Integer;
  301. var
  302. Rec: TsdDataRecord;
  303. begin
  304. Result := 0;
  305. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  306. Rec := sddDealPayment.FindKey('idxID', AID);
  307. if Assigned(Rec) then
  308. Result := Rec.ValueByName('CalcType').AsInteger;
  309. end;
  310. function TPhasePayData.GetLastestPhasePay(AType: Integer): Double;
  311. var
  312. Rec: TsdDataRecord;
  313. sTPField: string;
  314. i: Integer;
  315. begin
  316. case AType of
  317. 1: sTPField := 'TotalPrice' + IntToStr(TPhaseData(FPhaseData).PhaseProperty.AuditCount);
  318. 2: sTPField := 'EndTotalPrice' + IntToStr(TPhaseData(FPhaseData).PhaseProperty.AuditCount);
  319. 3: sTPField := 'PreTotalPrice' + IntToStr(TPhaseData(FPhaseData).PhaseProperty.AuditCount);
  320. end;
  321. Result := 0;
  322. for i := 0 to sddPhasePay.RecordCount - 1 do
  323. begin
  324. Rec := sddPhasePay.Records[i];
  325. // 检查是否为一般项
  326. if GetCalcType(Rec.ValueByName('ID').AsInteger) = 0 then
  327. if CheckMinus(Rec.ValueByName('ID').AsInteger) then
  328. Result := Result - Rec.ValueByName(sTPField).AsFloat
  329. else
  330. Result := Result + Rec.ValueByName(sTPField).AsFloat;
  331. end;
  332. end;
  333. procedure TPhasePayData.CopyPrePhasePayData;
  334. var
  335. iRecord: Integer;
  336. Rec, NewRec: TsdDataRecord;
  337. begin
  338. BeforeBatchOperation;
  339. try
  340. if sddPhasePay.RecordCount > 0 then Exit;
  341. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  342. for iRecord := 0 to sddDealPayment.RecordCount - 1 do
  343. begin
  344. Rec := sddDealPayment.Records[iRecord];
  345. NewRec := sddPhasePay.Add;
  346. NewRec.ValueByName('ID').AsInteger := Rec.ValueByName('ID').AsInteger;
  347. NewRec.ValueByName('EndTotalPrice0').AsFloat := Rec.ValueByName('TotalPrice').AsFloat;
  348. NewRec.ValueByName('PreTotalPrice0').AsFloat := Rec.ValueByName('TotalPrice').AsFloat;
  349. NewRec.ValueByName('Formula0').AsString := Rec.ValueByName('Formula').AsString;
  350. NewRec.ValueByName('StopCalc').AsBoolean := Rec.ValueByName('StopCalc').AsBoolean;
  351. end;
  352. finally
  353. AfterBatchOperation;
  354. end;
  355. end;
  356. procedure TPhasePayData.SetFieldValidChar;
  357. var
  358. i: Integer;
  359. sField: string;
  360. begin
  361. for i := 0 to iMaxStageCount - 1 do
  362. begin
  363. sField := 'TotalPrice' + IntToStr(i);
  364. sddPhasePay.FieldByName(sField).ValidChars := sddPhasePay.FieldByName(sField).ValidChars + ArithmeticCharSet + ExprsBaseCharSet;
  365. end;
  366. end;
  367. function TPhasePayData.PayRecord(AID: Integer): TsdDataRecord;
  368. begin
  369. Result := sddPhasePay.FindKey('idxID', AID);
  370. end;
  371. procedure TPhasePayData.RepairPhaseRecord;
  372. var
  373. i: Integer;
  374. vDealRec, vPhaseRec: TsdDataRecord;
  375. begin
  376. // 旧设计中,DealPayment中数据多于PhasePay
  377. // 在于用户新增了合同支付项,但未输入金额或公式,以减少数据
  378. // 现,要求存在合同支付项,设置了计提期限,但未输入金额或公式时,达计提期限时,金额需计
  379. // 故在每次计算前,检查一遍合同支付数据,以兼容旧项目,并保证DealPayment与PhasePay数据行相同
  380. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  381. begin
  382. if sddDealPayment.RecordCount > sddPhasePay.RecordCount then
  383. begin
  384. for i := 0 to sddDealPayment.RecordCount - 1 do
  385. begin
  386. vDealRec := sddDealPayment.Records[i];
  387. vPhaseRec := PayRecord(vDealRec.ValueByName('ID').AsInteger);
  388. if not Assigned(vPhaseRec) then
  389. vPhaseRec := AddPayRecord(vDealRec.ValueByName('ID').AsInteger);
  390. end;
  391. end;
  392. end;
  393. end;
  394. function TPhasePayData.GetBqwc(AType: Integer): Double;
  395. var
  396. Rec: TsdDataRecord;
  397. sTPField: string;
  398. i: Integer;
  399. begin
  400. case AType of
  401. 1: sTPField := 'TotalPrice' + IntToStr(TPhaseData(FPhaseData).PhaseProperty.AuditCount);
  402. 2: sTPField := 'EndTotalPrice' + IntToStr(TPhaseData(FPhaseData).PhaseProperty.AuditCount);
  403. 3: sTPField := 'PreTotalPrice' + IntToStr(TPhaseData(FPhaseData).PhaseProperty.AuditCount);
  404. end;
  405. Result := 0;
  406. for i := 0 to sddPhasePay.RecordCount - 1 do
  407. begin
  408. Rec := sddPhasePay.Records[i];
  409. // 检查是否为一般项
  410. if GetName(Rec.ValueByName('ID').AsInteger) = '本期完成计量' then
  411. begin
  412. Result := Rec.ValueByName(sTPField).AsFloat;
  413. Break;
  414. end;
  415. end;
  416. end;
  417. function TPhasePayData.GetName(AID: Integer): string;
  418. var
  419. Rec: TsdDataRecord;
  420. begin
  421. Result := '';
  422. with TProjectData(TPhaseData(FPhaseData).ProjectData).DealPaymentData do
  423. Rec := sddDealPayment.FindKey('idxID', AID);
  424. if Assigned(Rec) then
  425. Result := Rec.ValueByName('Name').AsString;
  426. end;
  427. procedure TPhasePayData.CopyPrePhasePayData(const APreFile: string;
  428. APreFinalIndex: Integer);
  429. function CheckFormulaWithBase(AFormula: string): Boolean;
  430. var
  431. sFormula: string;
  432. begin
  433. sFormula := StringReplace(AFormula, 'htj', '', [rfReplaceAll, rfIgnoreCase]);
  434. sFormula := StringReplace(sFormula, 'kgyfk', '', [rfReplaceAll, rfIgnoreCase]);
  435. sFormula := StringReplace(sFormula, 'clyfk', '', [rfReplaceAll, rfIgnoreCase]);
  436. sFormula := StringReplace(sFormula, 'ybbqwc', '', [rfReplaceAll, rfIgnoreCase]);
  437. sFormula := StringReplace(sFormula, 'bqwc', '', [rfReplaceAll, rfIgnoreCase]);
  438. Result := Length(sFormula) < Length(AFormula);
  439. end;
  440. const
  441. sCopySql = 'Insert Into %s (' +
  442. ' ID, PreTotalPrice0, EndTotalPrice0, Formula0, StopCalc' +
  443. ' ) Select ID, EndTotalPrice%d, EndTotalPrice%d, Formula%d, StopCalc' +
  444. ' From %s' +
  445. ' In ''%s''';
  446. var
  447. sPre, sSql: string;
  448. i: Integer;
  449. vRec: TsdDataRecord;
  450. fValue: Double;
  451. begin
  452. try
  453. sSql := Format(sCopySql, [TableName, APreFinalIndex, APreFinalIndex,
  454. APreFinalIndex, TableName, APreFile]);
  455. ExecuteSql(TPhaseData(FPhaseData).ADOConnection, sSql);
  456. finally
  457. sddPhasePay.Reload;
  458. for i := 0 to sddPhasePay.RecordCount - 1 do
  459. begin
  460. vRec := sddPhasePay.Records[i];
  461. if (not CheckFormulaWithBase(vRec.ValueByName('Formula0').AsString)) or (GetCalcType(vRec.ValueByName('ID').AsInteger) = 2) then
  462. vRec.ValueByName('Formula0').AsString := '';
  463. end;
  464. end;
  465. end;
  466. function TPhasePayData.GetTableName: string;
  467. begin
  468. Result := sdpPhasePay.TableName;
  469. end;
  470. end.