📄 updinvmc.pas
字号:
unit updINVMC;
interface
uses sysUtils, dbtables, bde, updBASE,LibStrs,ConstDEF;
type
TUpdateINVMC = class(TBaseUpdateUnit)
private
FOtherVar: variant;
function update_byINVI05(xQrySource: TQuery): Boolean;
function update_byINVI07(xQrySource: TQuery): Boolean;
function update_byINVI08(xQrySource: TQuery): Boolean;
function update_byINVI11(xQrySource: TQuery): Boolean;
function update_byINVI12(xQrySource: TQuery): Boolean;
function update_byAll(xSource: Variant): Boolean;
function update_byMOCI03(xQrySource: TQuery): Boolean;
function update_byMOCI05(xQrySource: TQuery): Boolean;
function update_byMOCI04(xQrySource: TQuery): Boolean;
function update_byMOCI06(xQrySource: TQuery): Boolean;
function update_byMOCI07(xQrySource: TQuery): Boolean;
function update_byBOMI05(xQrySource: TQuery): Boolean;
function update_byBOMI06(xQrySource: TQuery): Boolean;
public
function update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
function update2(xSource: Variant; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
end;
implementation
function TUpdateINVMC.update2(xSource: Variant; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
self.saveVar(xAction, xOtherVar, xUserData);
try
self.setDBname(xSource[0]);
Result := update_byAll(xSource)
finally
self.Query1.close;
end;
xMsg := self.Msg;
end;
function TUpdateINVMC.update(xQrySource: TQuery; xAction: string;
var xMsg: variant; xOtherVar: variant; xUserData: variant): Boolean;
begin
Result := True;
self.saveVar(xAction, xOtherVar, xUserData);
FOtherVar:= xOtherVar;
try
self.setDBname(xQrySource.DatabaseName);
if compareText(self.SourceTxnCode, 'TXNINVI05') = 0 then
Result := update_byINVI05(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNINVI07') = 0 then
Result := update_byINVI07(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNINVI11') = 0 then
Result := update_byINVI11(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNINVI12') = 0 then
Result := update_byINVI12(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNMOCI03') = 0 then
Result := update_byMOCI03(xQrySource)
else
if (compareText(self.SourceTxnCode, 'TXNINVI08') = 0) then
Result := update_byINVI08(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNMOCI05') = 0 then
Result := update_byMOCI05(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNMOCI04') = 0 then
Result := update_byMOCI04(xQrySource)
else
if ((compareText(self.SourceTxnCode, 'TXNMOCI06') = 0) OR (compareText(self.SourceTxnCode, 'TXNMOCI11') = 0)) then
Result := update_byMOCI06(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNMOCI07') = 0 then
Result := update_byMOCI07(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNBOMI05') = 0 then
Result := update_byBOMI05(xQrySource)
else
if compareText(self.SourceTxnCode, 'TXNBOMI06') = 0 then
Result := update_byBOMI06(xQrySource)
else
begin
end;
finally
self.Query1.close;
self.Query2.close;
end;
xMsg := self.Msg;
end;
function TUpdateINVMC.update_byINVI05(xQrySource: TQuery): Boolean;
var
mExist: Boolean;
mMC007,mMC008:Double;
mMC011,mMC012,mMC013:string;
begin
Result := True;
self.Msg[0] := '';
self.Msg[1] := 'INVMC';
mMC007 := FOtherVar[1]; //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -