📄 updacrta.pas
字号:
unit updACRTA;
interface
uses sysUtils, dbtables, Bde, updBase, ComObj, CONSTDEF,LibStrs;
type
TUpdateACRTA = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_byACRI03(xQrySource: TQuery): Boolean;
function update_byACRI02(xQrySource: TQuery): Boolean;
function update_byCOPI08(xQrySource: TQuery): Boolean;
function update_byCOPI09(xQrySource: TQuery): Boolean;
function update_byRMAI13(xQrySource: TQuery): Boolean;
function Add1(xValue: string): string;
function ZeroATfirst64(xValue: Int64; xLen: Integer): string;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
function TUpdateACRTA.update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
Result := True;
self.saveVar(xAction, xOtherVar, xUserData);
FOtherVar:= xOtherVar;
try
setDBName(xQrySource.databaseName);
if compareText(self.SourceTxnCode, 'TXNACRI02') = 0 then
Result := update_byACRI02(xQrySource)
else if compareText(self.SourceTxnCode, 'TXNACRI03') = 0 then
Result := update_byACRI03(xQrySource)
else if compareText(self.SourceTxnCode, 'TXNCOPI08') = 0 then
Result := update_byCOPI08(xQrySource)
else if compareText(self.SourceTxnCode, 'TXNCOPI09') = 0 then
Result := update_byCOPI09(xQrySource)
else if compareText(self.SourceTxnCode, 'TXNRMAI13') = 0 then
Result := update_byRMAI13(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query1.UnPrepare;
end;
xMsg := self.Msg;
end;
function TUpdateACRTA.update_byACRI03(xQrySource: TQuery): Boolean;
var
mTA027,mACRTASeqNo,mDBNAME : string ;
mexist : Boolean ;
mSign:Integer;
mBit,mMONEY,mResult,mDate : string;
vValidator:OleVariant;
mTA041,mRate,mTA031,mm:Double;
begin
Result := True;
self.Msg[0] := 'skip';
self.Msg[1] := 'ACRTA:ACRTB';
with xQrySOurce do
self.Msg[2] := fieldByName('TD001').asString+' '+FieldByName('TD002').asString+' '+
fieldByName('TD003').asString;
mDBNAME:=FOtherVar[1]; // dbname
mDate:=FOtherVar[2]; //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -