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

📄 ap_invoice_d.pas

📁 一个MRPII系统源代码版本
💻 PAS
字号:

unit Ap_Invoice_D;

Interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Base_Dialog, Grids, DBGridEh, Db, AdODB, StdCtrls;

Type
  TFrm_Ap_Invoice_D = Class(TFrm_Base_Dialog)
    DBGridEh1: TDBGridEh;
    DataSource1: TDataSource;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Lbl_WhName: TLabel;
    Lbl_InvBillDate: TLabel;
    Lbl_CurrencyName: TLabel;
    Label4: TLabel;
    Lbl_InvInBillNo: TLabel;
    procedure btn_okClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
     procedure getdata(InvInBillno:string;WHCode:string);
  end;

var
  Frm_Ap_Invoice_D: TFrm_Ap_Invoice_D;

implementation

uses Ap_Invoice;

{$R *.DFM}

procedure TFrm_Ap_Invoice_D.btn_okClick(Sender: TObject);
begin
  inherited;
  ModalResult := mrOK;
end;

procedure TFrm_Ap_Invoice_D.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  AdoQry_Tmp.Close;
end;

procedure TFrm_Ap_Invoice_D.getdata(InvInBillno:string;WHCode:string);
begin
  with AdoQry_tmp  do
  begin
    Connection:=Frm_Ap_Invoice.AdoQry_Main.Connection;
    Close;
    sql.clear;
    sql.Add('select InvInBill.whCode+'' ''+Warehouse.WHName as WhCodeName, '+
                    ' InvInBill.InvBillDate,'+
                    ' InvInBill.CurrencyCode+'' ''+Currency.currencyName as currencyCodeName,'+
                    ' InvInBillLine.InvBillLineNo ,'+
                    ' InvInBillline.ItemCode+'' ''+Item.ItemName  as ItemCodeName,'+
                    ' InvInBillLine.PONo,'+
                    ' InvInBillLine.POLineNo, '+
                    ' InvInBillLine.MONo,'+
                    ' InvInBillLine.MoLineNo, '+
                    ' InvInBillLine. BatchNo, '+
                    ' InvInBillLine.InvBillSfcQty ,'+
                    ' InvInBillLine.InvBillQty ,'+
                    ' convert(decimal(12,3),InvInBillLine.InvBillNoTaxPriceC) as InvBillNoTaxPriceC, '+
                    //' InvInBillLine.InvBillNoTaxPriceC,'+
                    //' isnull(InvInBillLine.InvBillNoTaxAmountc,0) '+ InvBillNoTaxAmount

                    ' InvInBillLine.InvBillNoTaxAmountC'+
                    ' from  InvInBillline left join InvInBill'+
                    '   on InvInBill.InvBillId=InvInBillline.InvBillId '+
                    ' left join Warehouse  '+
                    '   on Warehouse.whCode=InvInBill.whCode '+
                    ' left join Item '+
                    '   on Item.ItemCode=InvInBillline.ItemCode'+
                    ' left  join Currency '+
                    '   on Currency.CurrencyCode=InvInBill.CurrencyCode'+
                    ' where (InvInBill.InvBillNo='''+InvInBillno+''' )' +
                    '  and (InvInBill.WhCode='''+WHCode+''' ) ');
    open;
    Lbl_InvInBillNo.Caption:=InvInBillno;
    lbl_WhName.Caption:=fieldbyname('WhCodeName').asstring;
    lbl_InvBillDate.Caption :=fieldbyname('InvBillDate').asstring;
    lbl_CurrencyName.Caption:=fieldbyname('currencyCodeName').asstring;
    if not Isempty then
      Btn_ok.Enabled:=True
    else
      Btn_ok.Enabled:=False;
  end;
end;

end.

⌨️ 快捷键说明

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