//
VA rpt_DateTransactionJulian = BC Date - Actual Ship Date (F554784B)(ADDJ)
VA rpt_ProgramId = "ER554787"
VA rpt_OrderType = "SO"
// Next Number
If BC Document (Voucher, Invoice, etc.) (F554784B)(DOC) is equal to PC Document (Voucher, Invoice, etc.) (F554784B) (DOC)
VA rpt_LineNo = [VA rpt_LineNo]+1
Else
F0002 Get F4201 Next Number
RV DOCO = VA rpt_DocumentOrderInvoiceE
VA rpt_LineNo = 1
End If
//
// Sales Header
F47011.Fetch Single
If SV File_IO_Status is equal to CO SUCCESS
Else
F47011.Insert
End If
//
//
// Detail File
//
F4101.Fetch Single
VA rpt_StatusCodeLast = "520"
VA rpt_StatusCodeNext = "527"
VA rpt_AmountExtendedPrice = [BC Amount - Price per Unit (F554784B)(UPRC)]*[BC Quantity Shipped (F554784B)(SOQS)]
VA rpt_AmountExtendedPrice = [BC Amount - Extended Price (F554784B)(AEXP)]
VA rpt_AmtPricePerUnit2 = [BC Amount - Extended Price (F554784B)(AEXP)]/[BC Quantity Shipped (F554784B)(SOQS)]
//
//
F4101.Fetch Single
VA rpt_LineType = [VA rpt_StockingType]
If BC Description (F554784B)(DSC1) is equal to <Blank>
Else
VA rpt_DescriptionLine1 = BC Description (F554784B)(DSC1)
End If
VA rpt_UnitOfMeasure = "EA"
VA rpt_PriceOverrideCode = "1"
VA rpt_UniqID = [BC Unique Key ID (Internal) (F554784B)(UKID)]
F47012.Insert
F47012.Insert
// Update Uploaded data
VA rpt_EdiSuccessfullyProcess = "Y"
VA rpt_ContractNumber_01 = [BC Unique Key ID (Internal) (F554784B)(UKID)]
F47012.Fetch Single
If SV File_IO_Status is equal to CO SUCCESS
F554084A.Update
F554784B.Update
End If
RV testvar = [BC Unique Key ID (Internal) (F554784B)(UKID)]