📄 sal_enter_passbackshiporderh.pas
字号:
unit Sal_Enter_PassBackShipOrderH;
Interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Base_Check_Head, Menus, Db, ActnList, AdODB, Grids, DBGridEh, StdCtrls,
ExtCtrls, ComCtrls, ToolWin, jpeg, ExtPrintReport;
Type
TFrm_Sal_Enter_PassBackShipOrderH = Class(TFrm_Base_Check_Head)
AdoQry_HeadInvBillId: TFloatField;
AdoQry_HeadInvBillNo: TStringField;
AdoQry_HeadWHCode: TStringField;
AdoQry_HeadWhPositionCode: TStringField;
AdoQry_HeadInvBillDate: TDateTimeField;
AdoQry_HeadInvBillMonth: TStringField;
AdoQry_HeadBillTypeCode: TStringField;
AdoQry_HeadBillType2Code: TStringField;
AdoQry_HeadVendorCode: TStringField;
AdoQry_HeadEmployeeCode: TStringField;
AdoQry_HeadDeptCode: TStringField;
AdoQry_HeadCUSTOMERCode: TStringField;
AdoQry_HeadCURRENCYCode: TStringField;
AdoQry_HeadPONO: TStringField;
AdoQry_HeadMONO: TStringField;
AdoQry_HeadInvBillValuation: TIntegerField;
AdoQry_HeadInvBillWHCHCK: TIntegerField;
AdoQry_HeadWH_EmployeeCode: TStringField;
AdoQry_HeadInvBillFINCHCK: TIntegerField;
AdoQry_HeadFin_EmployeeCode: TStringField;
AdoQry_HeadPRINTTIMES: TIntegerField;
AdoQry_HeadSaleType: TStringField;
AdoQry_HeadShiftType: TStringField;
AdoQry_HeadInvBillRemArk: TStringField;
AdoQry_HeadInvBillInfo: TStringField;
AdoQry_HeadOWhPositionCode: TStringField;
AdoQry_HeadInvBillStkChck: TIntegerField;
AdoQry_HeadStk_EmployeeCode: TStringField;
AdoQry_HeadInvBillTmpFlag: TIntegerField;
AdoQry_HeadOverPlan: TIntegerField;
AdoQry_HeadPOLineNo: TIntegerField;
AdoQry_HeadMoLineNO: TIntegerField;
AdoQry_HeadInvBillCreateTime: TDateTimeField;
AdoQry_HeadSfc_EmployeeCode: TStringField;
AdoQry_HeadSal_EmployeeCode: TStringField;
AdoQry_HeadWH_EmployeeCode2: TStringField;
AdoQry_HeadInvBilltaxrate: TFloatField;
AdoQry_HeadMpsSale: TIntegerField;
AdoQry_HeadopBill: TIntegerField;
AdoQry_HeadSysBill: TIntegerField;
AdoQry_HeadOldInvBillNo: TStringField;
AdoQry_HeadPriceAdjustBill: TIntegerField;
AdoQry_HeadWipWaster: TIntegerField;
AdoQry_HeadAmountAdjust: TIntegerField;
AdoQry_HeadShipType: TIntegerField;
AdoQry_HeadShipAddresSCode: TStringField;
AdoQry_HeadShipModeCode: TStringField;
AdoQry_HeadSaleEmployeeCode: TStringField;
AdoQry_HeadPayTermCode: TStringField;
AdoQry_HeadInvoiceNo: TStringField;
AdoQry_HeadRemArk: TStringField;
AdoQry_HeadRemArk1: TStringField;
AdoQry_HeadTotalInvBillAmount: TFloatField;
AdoQry_HeadTotalInvBillNoTaxAmount: TFloatField;
AdoQry_HeadTotalInvBillnoTaxAmountc: TFloatField;
AdoQry_HeadTotalInvBillAmountc: TFloatField;
AdoQry_HeadCustomerName: TStringField;
AdoQry_HeadCustomerFalg: TStringField;
AdoQry_HeadDeptName: TStringField;
AdoQry_HeadDeptFalg: TStringField;
AdoQry_HeadSaleTypeName: TStringField;
AdoQry_HeadSaleTypeflag: TStringField;
AdoQry_HeadSaleEmployeeName: TStringField;
AdoQry_HeadSaleEmployeeFalg: TStringField;
AdoQry_HeadCurrencyName: TStringField;
AdoQry_HeadCurrencyFalg: TStringField;
AdoQry_HeadPayTermName: TStringField;
AdoQry_HeadPayTermFalg: TStringField;
AdoQry_HeadcreateEmployeeName: TStringField;
AdoQry_HeadcreateEmployeeFalg: TStringField;
AdoQry_HeadassessName: TStringField;
AdoQry_Headassessflag: TStringField;
AdoQry_HeadShipModeName: TStringField;
AdoQry_HeadShipModeFalg: TStringField;
AdoQry_HeadShipAddressName: TStringField;
AdoQry_HeadShipAddressFalg: TStringField;
AdoQry_HeadWhName: TStringField;
AdoQry_HeadWhPositionName: TStringField;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
procedure InitForm(AdOConnection:TAdOConnection;ReadOnly:Boolean);Override;
{ Public declarations }
end;
var
Frm_Sal_Enter_PassBackShipOrderH: TFrm_Sal_Enter_PassBackShipOrderH;
implementation
uses Sys_Global,Sal_Enter_PassBackShipOrder;
{$R *.DFM}
{ TFrm_Sa_Enter_PassShipOrderH }
procedure TFrm_Sal_Enter_PassBackShipOrderH.InitForm(
AdOConnection: TAdOConnection; ReadOnly: Boolean);
var sqltext:string;
begin
inherited;
sqltext:=' Select InvOutBill.*,CustomerName,Warehouse.WhName,WhPosition.WhPositionName,'
+' InvOutBill.CustomerCode+'' ''+ CustomerName as CustomerFalg,'
+' DeptName,'
+' InvOutBill.DeptCode+'' ''+DeptName As DeptFalg, '
+' SaleType.SaleTypeName, '
+' InvOutBill.SaleType+'' ''+SaleType.SaleTypeName as SaleTypeflag,'
+' Employee1.EmployeeName as SaleEmployeeName, '
+' SaleEmployeeCode+'' ''+Employee1.EmployeeName As SaleEmployeeFalg, '
+' CurrencyName,'
+' InvOutBill.CurrencyCode+'' ''+CurrencyName As CurrencyFalg, '
+' PayTerm.PayTermName, '
+' InvOutBill.PayTermCode+'' ''+PayTerm.PayTermName As PayTermFalg,'
+' tt.EmployeeName as createEmployeeName, '
+' Sal_EmployeeCode+'' ''+tt.EmployeeName As createEmployeeFalg, '
+' Employee2.EmployeeName as assessName, '
+' InvOutBill.Wh_EmployeeCode+'' ''+Employee2.EmployeeName as assessflag, '
+' ShipModeName,'
+' InvOutBill.ShipModeCode+'' ''+ShipModeName As ShipModeFalg,'
+' ShipAddressName, '
+' InvOutBill.ShipAddresSCode+'' ''+ShipAddressName As ShipAddressFalg'
+' into #BackShipOrderPass '
+' From InvOutBill left Join Customer '
+' On InvOutBill.CustomerCode=Customer.CustomerCode '
+' left Join Warehouse on InvOutBill.WhCode=Warehouse.WhCode '
+' left Join WhPosition on InvOutBill.WhCode=WhPosition.WhCode '
+' and InvOutBill.WhPositionCode=WhPosition.WhPositionCode '
+' left Join Dept '
+' On InvOutBill.DeptCode=Dept.DeptCode '
+' left join SaleType on InvOutBill.SaleType=SaleType.SaleTypeCode '
+' left Join Employee Employee1 '
+' On InvOutBill.SaleEmployeeCode=Employee1.EmployeeCode '
+' left Join Currency '
+' On InvOutBill.CurrencyCode=Currency.CurrencyCode '
+' left Join PayTerm '
+' On InvOutBill.PayTermCode=PayTerm.PayTermCode '
+' left Join Employee tt '
+' On InvOutBill.Sal_EmployeeCode=tt.EmployeeCode '
+' left join Employee Employee2 '
+' on InvOutBill.Wh_EmployeeCode=Employee2.EmployeeCode '
+' left Join ShipMode '
+' On InvOutBill.ShipModeCode=ShipMode.ShipModeCode '
+' left Join CustomerShipAddress '
+' On InvOutBill.ShipAddresSCode=CustomerShipAddress.ShipAddresSCode '
+' where exists (select * from InvOutBillLine where InvOutBillLIne.InvBillId=InvOutBill.InvBillId ) '
+' and BillTypeCode in (''0205'',''0206'') '
+' and ShipType=2 ';
selectfromsql:='select * from #BackShipOrderPass';
Executesql(AdoQry_Head,sqltext,1);
Executesql(AdoQry_Head,'select * from #BackShipOrderPass where InvBillWhChCk=0 Order by InvBilldate,InvBillNo',0);
Frm_Check_Body:=TFrm_Sal_Enter_PassBackShipOrder.Create(Application);
end;
procedure TFrm_Sal_Enter_PassBackShipOrderH.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
try
Executesql(AdoQry_tmp,'drop table #BackShipOrderPass',1);
except
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -