📄 sal_enter_shiporder_c1.dfm
字号:
'Provider=SQLOLEDB.1;Password=mdrcmrm;Persist Security Info=True;' +
'User ID=mdrcmrm;Initial Catalog=mdysjmrm;Data Source=192.168.0.1' +
'51;Use procedure for Prepare=1;Auto Translate=True;Packet Size=4' +
'096;Workstation ID=XYB'
CurSorType = ctStatic
BeforeEdit = AdoQry_MainBeforeEdit
SQL.Strings = (
'Select Sa_SaleOrderLine.SloQty-(Sa_SaleOrderLine.ShipQty)-(Sa_Sa' +
'leOrderLine.PrepareShipQty) as NoShipQty,'
'case when (Sa_SaleOrderLine.SloQty-(Sa_SaleOrderLine.ShipQty)-(' +
'Sa_SaleOrderLine.PrepareShipQty))>=OnHandInv '
' and (Sa_SaleOrderLine.SloQty-(Sa_SaleOrderLine.ShipQty)-(S' +
'a_SaleOrderLine.PrepareShipQty))>0'
' then Sa_SaleOrderLine.SloQty-(Sa_SaleOrderLine.ShipQty)-(Sa' +
'_SaleOrderLine.PrepareShipQty)'
' when (Sa_SaleOrderLine.SloQty-(Sa_SaleOrderLine.ShipQty)-(S' +
'a_SaleOrderLine.PrepareShipQty))<OnHandInv '
' then OnHandInv'
' end AbleShipQty,'
'Sa_SaleOrderLine.*,Item.ItemName, '
'Sa_SaleOrderLine.ItemCode+'#39' '#39'+Item.ItemName As ItemFalg, '
'UomName,Item.BatchCtrl, '
'CurrentInv.WhCode,Warehouse.WhName ,'
'CurrentInv.WhPositionCode, '
'WhPosition.WhPositionName, OnHandInv ,'
'BatchNo='#39#39' '
'From Sa_SaleOrderLine '
'Join Sa_SaleOrder '
'On Sa_SaleOrderLine.SloNo=Sa_SaleOrder.SloNo '
'Join Item '
'On Sa_SaleOrderLine.ItemCode=Item.ItemCode '
'Join Uom '
'On Item.UomCode=Uom.UomCode '
'Join CurrentInv '
'On CurrentInv.ItemCode= Sa_SaleOrderLine.ItemCode '
'Join Warehouse '
'On Warehouse.WhCode=CurrentInv.WhCode '
'Join WhPosition '
'On ( CurrentInv.WhPositionCode =WhPosition.WhPositionCode) and ' +
'(CurrentInv.WhCode=WhPosition.WhCode) '
'Where Item.BatchCtrl=0 '
'and Sa_SaleOrderLine.SloLineStatus=2 '
'And CustomerCode= '#39'0010101'#39' '
'And (Sa_SaleOrderLine.SloNo between '#39#39' and '#39'ZZZZZZ'#39') ' +
' '
'And (CreateDate Between '#39'2001.07.31'#39' And '#39'2001.10.29'#39') '
'union'
' Select '
'TMpsa_SaleOrderLine.SloQty-(TMpsa_SaleOrderLine.ShipQty)-(TMpsa_' +
'SaleOrderLine.PrepareShipQty) as NoShipQty,'
'case when (TMpsa_SaleOrderLine.SloQty-(TMpsa_SaleOrderLine.Ship' +
'Qty)-(TMpsa_SaleOrderLine.PrepareShipQty))>=InvQty '
' and (TMpsa_SaleOrderLine.SloQty-(TMpsa_SaleOrderLine.ShipQ' +
'ty)-(TMpsa_SaleOrderLine.PrepareShipQty))>0'
' then TMpsa_SaleOrderLine.SloQty-(TMpsa_SaleOrderLine.ShipQt' +
'y)-(TMpsa_SaleOrderLine.PrepareShipQty)'
' when (TMpsa_SaleOrderLine.SloQty-(TMpsa_SaleOrderLine.ShipQ' +
'ty)-(TMpsa_SaleOrderLine.PrepareShipQty))<InvQty '
' then InvQty'
' end AbleShipQty,'
''
'TMpsa_SaleOrderLine.* ,BatchCurrentInv.WhCode,Warehouse.WhName ,' +
' '
'BatchCurrentInv.WhPositionCode, '
'WhPosition.WhPositionName,InvQty as OnHandInv,BatchCurrentInv.Ba' +
'tchNo '
'from '
'(Select Sa_SaleOrderLine.*, '
' Item.ItemName, '
'Sa_SaleOrderLine.ItemCode+'#39' '#39'+Item.ItemName As ItemFalg, '
' '
'UomName,Item.BatchCtrl '
'From Sa_SaleOrderLine '
'Join Sa_SaleOrder '
'On Sa_SaleOrderLine.SloNo=Sa_SaleOrder.SloNo '
'Join Item '
'On Sa_SaleOrderLine.ItemCode=Item.ItemCode '
'Join Uom '
'On Item.UomCode=Uom.UomCode '
'Where Item.BatchCtrl=1 '
'and Sa_SaleOrderLine.SloLineStatus=2 '
'And CustomerCode= '#39'0010101'#39' '
'And (Sa_SaleOrderLine.SloNo between '#39#39' and '#39'ZZZZZZ'#39') ' +
' '
'And (CreateDate Between '#39'2001.07.31'#39' And '#39'2001.10.29'#39') )TMpsa_Sa' +
'leOrderLine '
'join (Select ItemCode,BatchNo ' +
' '
'From BatchLine '
'Join Batch On Batch.BatchId=BatchLine.BatchId '
'Where BatchStatus=0 And (BatchLine.UsefulCtrl=0 Or (DateDiff(dd,' +
'FirstInDate,GetDate())<=UsefulDate ) ) ) TmpBatchLine ' +
' on TMpsa_SaleOrderLine.ItemCode =TmpBatchLine.ItemCode ' +
' Join BatchCurrentInv On BatchCurrentI' +
'nv.BatchNo=TmpBatchLine.BatchNo Join Warehouse ' +
' On Warehouse.WhCode=BatchCurrentInv.WhC' +
'ode Join WhPosition ' +
' On (BatchCurrentInv.WhPositionCode =WhPosition.WhPositionCo' +
'de) and (BatchCurrentInv.WhCode=WhPosition.WhCode) ')
Left = 432
Top = 209
object AdoQry_MainSloNo: TStringField
FieldName = 'SloNo'
Size = 16
end
object AdoQry_MainSloLineNo: TIntegerField
FieldName = 'SloLineNo'
end
object AdoQry_MainItemCode: TStringField
FieldName = 'ItemCode'
Size = 16
end
object AdoQry_MainSloQty: TFloatField
FieldName = 'SloQty'
end
object AdoQry_MainPrepareShipQty: TFloatField
FieldName = 'PrepareShipQty'
end
object AdoQry_MainNoTaxPrice: TFloatField
FieldName = 'NoTaxPrice'
end
object AdoQry_MainNoTaxAmount: TFloatField
FieldName = 'NoTaxAmount'
end
object AdoQry_MainTaxPrice: TFloatField
FieldName = 'TaxPrice'
end
object AdoQry_MainTaxAmount: TFloatField
FieldName = 'TaxAmount'
end
object AdoQry_MainSloLineDate: TDateTimeField
FieldName = 'SloLineDate'
end
object AdoQry_MainSloLineStatus: TIntegerField
FieldName = 'SloLineStatus'
end
object AdoQry_MainDiSCountRate: TFloatField
FieldName = 'DiSCountRate'
end
object AdoQry_MainDiSCountAmount: TFloatField
FieldName = 'DiSCountAmount'
end
object AdoQry_MainSloLineRemArk: TStringField
FieldName = 'SloLineRemArk'
Size = 60
end
object AdoQry_MainSloCheck: TIntegerField
FieldName = 'SloCheck'
end
object AdoQry_MainItemName: TStringField
FieldName = 'ItemName'
Size = 80
end
object AdoQry_MainItemFalg: TStringField
FieldName = 'ItemFalg'
ReadOnly = True
Size = 97
end
object AdoQry_MainUomName: TStringField
FieldName = 'UomName'
Size = 10
end
object AdoQry_MainWhCode: TStringField
FieldName = 'WhCode'
Size = 4
end
object AdoQry_MainWhName: TStringField
FieldName = 'WhName'
Size = 40
end
object AdoQry_MainWhPositionCode: TStringField
FieldName = 'WhPositionCode'
Size = 4
end
object AdoQry_MainWhPositionName: TStringField
FieldName = 'WhPositionName'
Size = 40
end
object AdoQry_MainOnHandInv: TFloatField
FieldName = 'OnHandInv'
end
object AdoQry_MainBatchCtrl: TIntegerField
FieldName = 'BatchCtrl'
end
object AdoQry_MainBatchNo: TStringField
FieldName = 'BatchNo'
ReadOnly = True
Size = 16
end
object AdoQry_MainShipQty: TFloatField
FieldName = 'ShipQty'
end
object AdoQry_MainLastOperationTime: TDateTimeField
FieldName = 'LastOperationTime'
end
object AdoQry_MainNoShipQty: TFloatField
FieldName = 'NoShipQty'
ReadOnly = True
end
object AdoQry_MainAbleShipQty: TFloatField
FieldName = 'AbleShipQty'
ReadOnly = True
end
object AdoQry_MainDisedShipQty: TFloatField
DisplayLabel = '已分配库存'
FieldName = 'DisedShipQty'
end
object AdoQry_MainCustomerCode: TStringField
FieldName = 'CustomerCode'
end
object AdoQry_MainCurrencyCode: TStringField
DisplayLabel = '货币代码'
FieldName = 'CurrencyCode'
end
object AdoQry_MainTaxRate_Percent: TFloatField
DisplayLabel = '税率'
FieldName = 'TaxRate_Percent'
end
object AdoQry_MainPayTermCode: TStringField
FieldName = 'PayTermCode'
end
object AdoQry_MainPayTermName: TStringField
FieldName = 'PayTermName'
end
end
inherited DataSource: TDataSource
Left = 472
Top = 73
end
inherited ExtPrintReport: TExtPrintReport
Left = 120
Top = 137
end
inherited PopuPmenu: TPopuPmenu
Left = 208
Top = 193
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -