⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updinvmb.pas

📁 拥有全套神州数码马易飞ERP源码,现上传部分源码
💻 PAS
字号:
unit updINVMB;

interface

uses sysUtils, dbtables, updBASE,ConstDEF;

type
  TUpdateINVMB = class(TBaseUpdateUnit)
  private
    FOtherVar: variant;
    function update_byINVI05(xQrySource: TQuery): Boolean;
    function update_byCOPI08(xQrySource: TQuery): Boolean;
    function update_byCOPI09(xQrySource: TQuery): Boolean;
    function update_byPURI11(xQrySource: TQuery): Boolean;
    function update_byPURI09(xQrySource: TQuery): 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_byWSCI12(xQrySource: TQuery): Boolean;  //880907 ADD
    function update_byBOMI05(xQrySource: TQuery): Boolean;
    function update_byBOMI06(xQrySource: TQuery): Boolean;
    function update_byINVI07(xQrySource: TQuery): Boolean;
    function update_byWSCI10(xQrySource: TQuery): Boolean; //890425 ADD
    function update_byRMAI13(xQrySource: TQuery): Boolean;     
  public
    function update(xQrySource: TQuery; xAction: string; var xMsg: variant;
                         xOtherVar: variant; xUserData: variant): Boolean;
  end;

implementation

function TUpdateINVMB.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, 'TXNWSCI10') = 0 then
      Result := update_byWSCI10(xQrySource)
    else
    if compareText(self.SourceTxnCode, 'TXNWSCI12') = 0 then
      Result := update_byWSCI12(xQrySource)
    else
    if compareText(self.SourceTxnCode, 'TXNINVI05') = 0 then
      Result := update_byINVI05(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNCOPI08') = 0) then
      Result := update_byCOPI08(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNRMAI13') = 0) then
      Result := update_byRMAI13(xQrySource)
    else
    if (compareText(self.SourceTxnCode, 'TXNCOPI09') = 0) then
      Result := update_byCOPI09(xQrySource)
    else
    if compareText(self.SourceTxnCode, 'TXNPURI11') = 0 then
      Result := update_byPURI11(xQrySource)
    else
    if ((compareText(self.SourceTxnCode, 'TXNPURI09') = 0) OR (compareText(self.SourceTxnCode, 'TXNPURI13') = 0)) then
      Result := update_byPURI09(xQrySource)
    else
    if compareText(self.SourceTxnCode, 'TXNMOCI03') = 0 then
      Result := update_byMOCI03(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
    if compareText(self.SourceTxnCode, 'TXNINVI07') = 0 then
      Result := update_byINVI07(xQrySource)
    else
    begin
    end;
  finally
    //VarArrayUnlock(self.Msg);
    self.Query1.close;
  end;
  xMsg := self.Msg;
end;

function TUpdateINVMB.update_byINVI05(xQrySource: TQuery): Boolean;
var
  mMB065,mAQUANTY,mMB064,OldMB064:Double;
begin
  Result := True;
  self.Msg[0] := 'skip';
  self.Msg[1] := 'INVMB';
  self.Msg[2] := xqrySource.FieldByName('TB004').asString;  //珇腹

  if xqrySource.FieldByName('MC004').asString<>'1' then Exit; //畐

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -