You are on page 1of 71

Listing of ER for Application : Online Invoice Inquiry (P42230) ======================================================================= FORM: Work With Online Invoice [FIND BROWSE]

(W42230A) ======================================================================= CONTROL: FORM EVENT: Dialog is Initialized ----------------------------------------------------------------------0001 // ============================================================= 0002 // Date AB# SAR# Description 0003 // ============================================================ 0004 // 12/21/1998 1469038 Vertex Changes 0005 // 04/28/2005 IC9024578 7472908 Online Invoice allows views of other 0006 // customers' information. 0007 // 09/20/2004 IC8866327 7188288 To display the detached 0008 // adjustment correctly, when it is associated with a bulk item, and t he 0009 // pricing UOM is different from the primary UOM 0010 // 07/26/2006 IC8998813 8006941 To prevent displaying the error messa ge 0011 // "exchange rate not found" for same currency conversion 0012 // 07/26/2006 IC8998813 8051195 To calculate detached adjustment 0013 // amount properly in online invoice for Dual UOM item 0014 // 05/08/2007 LS5912623 8150388 Added kit component invoicing 0015 // capability. 0016 // 06/28/2007 SY9051277 8430056 Display error to set UOM conversion 0017 // 03/03/08 RB7567907 8754034 Online Invoice Etended Price 0 after parti al 0018 // ============================================================ 0019 // Note: The grid's sequencing is set specifically for kit processing. (S ort 0020 // by KITID to keep the kit displayed together.) Please keep this context in 0021 // mind when making changes to it. 0022 // ============================================================ 0023 // 0024 Determine if Vertex is Active <Blank> -> BF szSystemCode VA frm_cIsvertexActive_VVTX <- BF cUseVertexFlag 0025 // End vertex changes 0026 Get Internal Next NUmber VA frm_mnVertexJobNumber_JOBS <- BF mnJobnumberA 0027 // SAR# 4648664 Begin 0028 Get Local Computer ID VA frm_szComputerID_CTID <- BF szMachineKey 0029 // End SAR# 4648664 0030 // ======================================================================== = 0031 // Set default value for Print Invoice Version 0032 // ======================================================================== = 0033 // 0034 If PO szPrintInvoiceVersion is equal to <Blank> 0035 PO szPrintInvoiceVersion = "ZJDE0001" 0036 End If 0037 // 0038 // ======================================================================== = 0039 // If Multi-Currency is OFF, hide the Mode Check Box, otherwise default the

Mode 0040 // Check Box to ON or OFF depending on the passed parameter. 0041 // ======================================================================== = 0042 // 0043 If SL CurrencyProcessing is equal to "N" 0044 Hide Control(FC Foreign ) 0045 Else 0046 If FI CurrencyMode is equal to "D" 0047 FC Foreign = "D" 0048 Else 0049 FC Foreign = "F" 0050 End If 0051 // 0052 // SAR 5282019 0053 // 0054 If PO cWeb_Enable is equal to "1" 0055 FC Foreign = "F" 0056 End If 0057 // 0058 End If 0059 // 0060 // ======================================================= 0061 // Hide Generic Text for Form 'Attachments' static control and disable the exits 0062 // ======================================================= 0063 // 0064 Hide Control(FC Attachments) 0065 Disable Control(HC Discou&nt Summary, ) 0066 Disable Control(HC Ta&x Summary, ) 0067 Disable Control(HC O&rder Address, ) 0068 Disable Control(HC &Order) 0069 Disable Control(HC &Invoice Attachment) 0070 Disable Control(HC Order Dat&es) 0071 Disable Control(HC Order &Detail) 0072 Disable Control(HC A&ttachments) 0073 Disable Control(HC &Pricing History) 0074 // 0075 // SAR 5282019 0076 // 0077 Disable Control(FC Advanced Search) 0078 Disable Control(FC Tax Summary) 0079 Disable Control(FC Discount Summary) 0080 // 0081 FC MATH06-Rec. Count [HIDDEN] = "0" 0082 // 0083 // ======================================================= 0084 // Call Discount Store/Get routine in initialise mode to create the 0085 // discount array. 0086 // ======================================================= 0087 // 0088 F4211 Accumulate Payment Term Discount "3" <> BF cStoreGetOrInitialize <Zero> <> BF cSuppressErrorMsg FC GENLNG-Discount Ptr. [HIDDEN] <- BF idPtrToDiscountList 0089 // 0090 // ======================================================= 0091 // Call Tax Store/Get routine in initialise mode to create the "By Group" 0092 // and "By Area/Authority" arrays. 0093 // =======================================================

0094 // 0095 F4211 Accumulate Sales Tax Summary "3" <> BF cStoreGetOrInitialize "N" <> BF cStoreTaxAreaExplCode FC GENLN2-Grp Array Ptr. [HIDDEN] <- BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] <- BF idPtrToAreaAndAuthority "1" -> BF idPtrToAreaExplanation <Zero> <> BF cSuppressErrorMsg 0096 // 0097 // ======================================================================== = 0098 // Bypass create link-list for Explanation. No memory to clean-up 0099 // Set flage to notice FIND button do not clear link-list 0100 // ======================================================================== = 0101 FC EV05-First Time SW [HIDDEN] = "1" 0102 // 0103 // SAR 5282019 0104 // 0105 If PO cWeb_Enable is equal to "1" 0106 VA frm_cBlankChar_EV01 = " " 0107 F0092 Get User ID and Address Book Number SL UserID -> BF szUserId VA frm_mnCustomerNumber_AN8 <- BF mnAddressNumber VA frm_szErrorMessage_DTAI <- BF szErrorMessageId "1" -> BF cSuppressErrorMessage 0108 F0101 Get Address Book Description VA frm_mnCustomerNumber_AN8 -> BF mnAddressNumber VA frm_szCustomerDescription_DSC1 <- BF szNameAlpha 0109 VA frm_szCustomerDescription_DSC1 = rtrim(VA frm_szCustomerDescription_D SC1,VA frm_cBlankChar_EV01) 0110 VA frm_szFormTitle_DS01 = concat(TV View Sales Order Invoices for [HIDDE N],VA frm_cBlankChar_EV01) 0111 VA frm_szFormTitle_DS01 = concat(VA frm_szFormTitle_DS01,VA frm_szCustom erDescription_DSC1) 0112 Set Form Title(VA frm_szFormTitle_DS01) 0113 Hide Control(FC Discount Summary) 0114 Hide Control(FC Tax Summary) 0115 Show Control(FC Discount Tax Summary Message) 0116 Enable Control(FC Advanced Search) 0117 // SAR 7472908 - Restrict customer to view other customer's invoice in C SS 0118 // mode 0119 Disable Control(FC Document Number) 0120 Disable Control(FC Order Number) 0121 // End of SAR 7472908 0122 End If 0123 // 0124 // Find out if the transportation system is active. 0125 Get Environment Value "SY49" -> BF szDataItem VA frm_cIsTransportSysActive_EV01 <- BF cModuleExistance 0126 If PO cBypassProcessCommissions is equal to "1" 0127 Disable Control(HC Commission Accruals) 0128 End If ----------------------------------------------------------------------EVENT: Post Dialog is Initialized ----------------------------------------------------------------------0001 //

0002 // ======================================================================== = 0003 // SAR 2196123 Begin 0004 // Default whether to include or exclude backorders from the Processing Opt ions. 0005 // ======================================================================== = 0006 // 0007 If PO cBackordersIncluded_EV01 is equal to "1,2,3" 0008 FC EV02-Backorders Incl. [HIDDEN] = PO cBackordersIncluded_EV01 0009 Else 0010 FC EV02-Backorders Incl. [HIDDEN] = "1" 0011 End If 0012 // SAR 2196123 End 0013 // 0014 // ======================================================================== = 0015 // Default the Status Code Ranges (From & Thru) and Based On Status Flag 0016 // from the Processing Options. Backorders Included flag defaults to 1. 0017 // ======================================================================== = 0018 // 0019 If PO szStatusCodeFrom is greater than <Blank> And PO szStatusCodeThru is greater than <Blank> 0020 FC LTT2-Status From (wf) [HIDDEN] = PO szStatusCodeFrom 0021 FC NXT2-Status Thru (wf) [HIDDEN] = PO szStatusCodeThru 0022 Else 0023 FC LTT2-Status From (wf) [HIDDEN] = " " 0024 FC NXT2-Status Thru (wf) [HIDDEN] = " " 0025 PO szStatusCodeFrom = " " 0026 PO szStatusCodeThru = " " 0027 End If 0028 If PO cBasedOnStatus is equal to "1" 0029 FC EV01-Based on Status [HIDDEN] = PO cBasedOnStatus 0030 Else 0031 FC EV01-Based on Status [HIDDEN] = "2" 0032 End If 0033 ! FC EV02-Backorders Incl. [HIDDEN] = "1" 0034 // 0035 // ======================================================= 0036 // If Order Type (in data structure) is non-blank, load Order Number, 0037 // Type and Key Company from data structure fields. 0038 // ======================================================= 0039 // 0040 If FI OrderType is greater than " " 0041 FC Order Number = FI DocumentOrderInvoiceE 0042 FC Order Type = FI OrderType 0043 FC Order Company = FI CompanyKeyOrderNo 0044 End If 0045 // 0046 // ======================================================= 0047 // If Invoice Type (from data structure) is non-blank, load Invoice #, 0048 // Invoice Type and Invoice Key Company. 0049 // ======================================================= 0050 // 0051 If FI Documenttype is greater than " " 0052 FC Document Number = FI Docvoucherinvoicee 0053 FC Document Type = FI Documenttype 0054 FC Document Company = FI Companykey 0055 End If

0056 // 0057 // SAR 5282019 0058 // For Web Transactions - Set form like reg form, then hide blank items 0059 // 0060 If PO cWeb_Enable is equal to "1" 0061 // 0062 // Mode 3 transactions 0063 // 0064 Set Control Text(FC st_Order_Number, FC Order Number) 0065 Set Control Text(FC st_Invoice_Number, FC Document Number) 0066 Hide Grid Column(FC Grid, GC OrderNo.) 0067 Hide Grid Column(FC Grid, GC OrderType) 0068 Hide Grid Column(FC Grid, GC InvoiceNo.) 0069 Hide Grid Column(FC Grid, GC InvoiceType) 0070 Hide Control(FC Tax Summary) 0071 Hide Control(FC Discount Summary) 0072 Show Control(FC Discount Tax Summary Message) 0073 IfFC Document Numberis equal to<Blank>OrFC Document Numberis equal to<Nu ll> 0074 Hide Control(FC Sales Invoice Number) 0075 Hide Control(FC st_Invoice_Number) 0076 // SAR 6172479 - display the correct column 0077 ! Show Grid Column(FC Grid, GC InvoiceNo.) 0078 Show Grid Column(FC Grid, GC InvoiceNumber) 0079 Show Grid Column(FC Grid, GC InvoiceType) 0080 Else 0081 Show Control(FC Sales Invoice Number) 0082 Show Control(FC st_Invoice_Number) 0083 End If 0084 If FC Order Number is equal to <Blank> Or FC Order Number is equal to < Null> 0085 Hide Control(FC Sales Order Number) 0086 Hide Control(FC st_Order_Number) 0087 // SAR 6172479 - display the correct column 0088 ! Show Grid Column(FC Grid, GC OrderNo.) 0089 Show Grid Column(FC Grid, GC OrderNumber) 0090 Show Grid Column(FC Grid, GC OrderType) 0091 Else 0092 Show Control(FC Sales Order Number) 0093 Show Control(FC st_Order_Number) 0094 End If 0095 // 0096 // SAR 6172485 - Initialize currency code static text field. 0097 Set Control Text(FC st_Currency_CodeDesc, <Blank>) 0098 // 0099 End If 0100 // SAR# 5717289 Begin 0101 // Intialize previous order variables 0102 VA frm_cFirstPass_EV01 = "1" 0103 VA frm_mnPreviousDOCO = "0" 0104 VA frm_szPreviousDCTO = "0" 0105 VA frm_szPreviousKCOO = "0" 0106 VA frm_PreviousAddressNumber_AN8 = "0" 0107 // End SAR# 5717289 0108 // 0109 // ======================================================= 0110 // If either the Order # or Invoice # has been defaulted from the calling 0111 // application, press <Find>, otherwise set the Order Type to the Processin g 0112 // Option default.

0113 // ======================================================= 0114 // 0115 If PO cWeb_Enable is equal to "1" 0116 If FC Order Type is equal to <Blank> Or FC Order Type is equal to <Null > 0117 FC Order Type = PO szOrderType 0118 End If 0119 IfFI Docvoucherinvoiceeis not equal to<Blank>AndFI Docvoucherinvoiceeis not equal to<Null>OrFI DocumentOrderInvoiceEis not equal to<Blank>AndFI Document OrderInvoiceEis not equal to<Null> 0120 Press Button(HC F&ind) 0121 End If 0122 Else 0123 If FI OrderType is greater than <Blank> Or FI Documenttype is greater t han <Blank> 0124 Press Button(HC F&ind) 0125 Else 0126 FC Order Type = PO szOrderType 0127 End If 0128 End If 0129 // SAR# 6514476 - Charge Reference column was added for translations 0130 // purposes. Enhancement coding for this enhancement have not been 0131 // completed yet. 0132 Hide Grid Column(FC Grid, GC ChargeReference) ----------------------------------------------------------------------EVENT: Grid Record is Fetched ----------------------------------------------------------------------evt_mnTempTotalAreaTaxRat_TRAT evt_cTextLineYN_TEXO evt_mnItemGrpForTaxSumm_MATH08 evt_cSuppressDiscount_EV01 evt_cCurCodeDesc_DL01 evt_cStockingType_STKT evt_szErrorMessageID_DTAI 0001 // ======================================================= 0002 // At present, interactive applications can access their Processing Options when 0003 // they are called directly from a menu. If called from another applicatio n, th 0004 // processing options are ignored (null). 0005 // This application works fine when called from the menu. The processing 0006 // options for selecting the Status Code range are used to include only tho se 0007 // order lines that lie within the range. 0008 // If however, the user selects an order in Sales Order Entry, then exits t o thi 0009 // application, the processing options are null, so no lines are displayed. 0010 // To fix this problem, if the Processing Options "From Status" and "To Sta tus" 0011 // are blank, the status range check is ignored, so ALL lines are included. 0012 // 0013 // Note: The code to bypass the status range check can be removed once 0014 // the interactive application can use the processing options in all situat ions. 0015 // ======================================================= 0016 // 0017 // SAR 5704437 Begin 0018 // Initialize Bulk Flag 0019 VA frm_cBulkPackedFlag_BPFG = " "

0020 // End SAR 5704437 0021 // 0022 // SAR 4878929 Begin 0023 VA frm_mnTaxableAmount_MATH04 = "0" 0024 // SAR 4878929 End 0025 // 0026 // ======================================================= 0027 // SAR #8150388: Initialize kit component invoicing variables. Note that for 0028 // performance considerations we do not reset the parent variables--we will 0029 // attempt to reuse their values whenever possible. Note also that the but ton 0030 // press relates to the prior row we may have processed. 0031 // ======================================================= 0032 VA frm_iProcessKitInvcCmpnt_INT01 = "0" 0033 VA frm_iProcessKitInvParent_INT01 = "0" 0034 VA frm_mnCmpntAmtExtPrice_AEXP = "0" 0035 VA frm_mnCmpntForAmtExtPrice_FEA = "0" 0036 VA evt_szErrorMessageID_DTAI = "" 0037 Press Button(FC Write Kit Parent Rows) 0038 // 0039 // SAR# 2800626 0040 // 0041 // Check to see if this order is a domestic or foreign transaction. I t is 0042 // domestic transaction when there is a domestic price and no foreign p rice. 0043 // 0044 If FI CurrencyMode is equal to <Blank> Or FI CurrencyMode is equal to <Nul l> 0045 If BC Amount - Price per Unit (F4211) is not equal to <Zero> And BC Amo unt - Foreign Price per Unit (F4211) is equal to <Zero> 0046 FC Foreign = "D" 0047 End If 0048 End If 0049 If PO szStatusCodeFrom is equal to " " And PO szStatusCodeThru is equal to " " And FC LTT2-Status From (wf) is equal to " " And FC NXT2-Status Thru (wf) is equal to " " 0050 FC EV09-Skip This Rec. [HIDDEN] = "0" 0051 Else 0052 FC EV09-Skip This Rec. [HIDDEN] = "1" 0053 If FC EV01-Based on Status is equal to "1" 0054 If BC Status Code - Last is greater than or equal to FC LTT2-Status F rom (wf) And BC Status Code - Last is less than or equal to FC NXT2-Status Thru (wf) 0055 FC EV09-Skip This Rec. [HIDDEN] = "0" 0056 End If 0057 Else 0058 If BC Status Code - Next is greater than or equal to FC LTT2-Status F rom (wf) And BC Status Code - Next is less than or equal to FC NXT2-Status Thru (wf) 0059 FC EV09-Skip This Rec. [HIDDEN] = "0" 0060 End If 0061 End If 0062 End If 0063 // 0064 // ======================================================= 0065 // Do not process if the status codes were excluded. 0066 // ======================================================= 0067 //

0068 If FC EV09-Skip This Rec. is equal to "1" 0069 Suppress Grid Line(FC Grid) 0070 Else 0071 // 0072 // Save sales order key fields to use in form interconnects (such as Order 0073 // Address P4006). 0074 // 0075 VA frm_mnSaveOrderNumber_DOCO = BC Document (Order No, Invoice, etc.) (F 4211) 0076 VA frm_szSaveOrderType_DCTO = BC Order Type (F4211) 0077 VA frm_szSaveOrderCompany_KCOO = BC Order Company (Order Number) (F4211) 0078 // 0079 // ======================================================= 0080 // If First Time read for order, retrieve the Sold & Ship To Addresses 0081 // and the Display Weight/Volume Units of Measure from the Sales 0082 // Order Header F4201. Also get the Currency Conversion Rate. If 0, an d 0083 // Multi-Currency is ON, change Mode Check Box to OFF. 0084 // ======================================================= 0085 // 0086 If FC EV05-First Time SW is equal to "1" 0087 FC EV05-First Time SW [HIDDEN] = "0" 0088 F4009 Get Distribution Constants VA frm_cAdvancedPricingYN_ADVP <- BF cAdvancedSalesPricing 0089 F4201 Get Hold Code, Order Totals, and Information BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderNumber BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szKeyCompany FC EKEY-Gen. Error Msg [HIDDEN] <- BF szErrorMesgID "1" -> BF cSuppressErrorMesg FC Address Number <- BF mnSoldToAddrNumber FC Ship To <- BF mnShipToAddrNumber FC WUMD-Disp Wght Uom [HIDDEN] <- BF szDisplayWeightUOM FC VUMD-Disp Volum Uom [HIDDEN] <- BF szDisplayVolumeUOM VA frm_szTransactionCurrency_CRCD <- BF szCurrencyCodeFrom FC CRR-Header Curr Rate [HIDDEN] <- BF mnCurrencyConvRate 0090 If FC EKEY-Gen. Error Msg is not equal to " " 0091 FC Address Number = "0" 0092 FC Ship To = "0" 0093 End If 0094 If SL CurrencyProcessing is not equal to "N" 0095 // 0096 // Get base currency code. 0097 // 0098 F0010 Get Company Currency Code BC Order Company (Order Number) (F4211) -> BF szCompany VA frm_szBaseCurrency_CRDC <- BF szCurrencyCode 0099 // SAR# 2577532 0100 // 0101 // Delete the if FC CRR-Header Curr Rate is equal to zero then statement so 0102 // that if the transaction involves EURO, then it will allow o nline invoice 0103 // to switch between domestic and foreign currency modes. 0104 // 0105 If FC Foreign is equal to "D" 0106 FC Currency Code = VA frm_szBaseCurrency_CRDC 0107 Else 0108 FC Currency Code = VA frm_szTransactionCurrency_CRCD

0109 0110 0111 0112 0113 0114 0115 L01) 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126

End If // // SAR 5282019 // If PO cWeb_Enable is equal to "1" F0013 Get Currency Description FC Currency Code -> BF szCurrencyCode VA evt_cCurCodeDesc_DL01 <- BF szCurrencyDescription Set Control Text(FC st_Currency_CodeDesc, VA evt_cCurCodeDesc_D End If // End If End If // // ======================================================= // Get Line Type Constants for line. If error, don't write grid line. // ======================================================= // // SAR 3276539 - Retrieve text line Y/N F40205 Get Line Type Constants BC Line Type (F4211) <> BF szLineType FC IVI-Inventory Interface [HIDDEN] <- BF cInventoryInterface VA evt_cTextLineYN_TEXO <- BF cTextLine FC CDSC-Discnt Allowed [HIDDEN] <- BF cIncludeCashDiscount <Zero> <> BF cSuppressErrorMessage FC ERRC-Gen. Error Flag [HIDDEN] <> BF cErrorCode If FC ERRC-Gen. Error Flag is not equal to "0" Suppress Grid Line(FC Grid) Else // ======================================================= // SAR 5266975 - Determine whether Discount should be suppressed or n

0127 0128 0129 0130 0131 ot. 0132 // ======================================================= 0133 // 0134 If FC CDSC-Discnt Allowed is equal to "Y" Or FC CDSC-Discnt Allowed is equal to "1" 0135 VA evt_cSuppressDiscount_EV01 = "0" 0136 Else 0137 VA evt_cSuppressDiscount_EV01 = "1" 0138 End If 0139 // END SAR 5266975 0140 // 0141 // ======================================================= 0142 // SAR 8150388 - Kit Component Processing 0143 // ======================================================= 0144 // 0145 // Kit component invoicing requires a few extra grid rows of informat ion. 0146 // Determine if such invoicing has occurred. (We use nested if in li eu of 0147 // using a compound if statement.) 0148 If BC Kit Master Line Number (F4211) is greater than <Zero> And BC It em Number - Related (Kit) (F4211) is greater than <Zero> And BC Document (Vouche r, Invoice, etc.) (F4211) is greater than <Zero> 0149 If BC Related Kit Component (F4211) is equal to <Blank> Or BC Rela ted Kit Component (F4211) is equal to <Null> Or BC Related Kit Component (F4211) is equal to <Zero> 0150 If BC Accumulated Amount Invoiced (Domestic) (F4211) is not equ al to <Blank> And BC Accumulated Amount Invoiced (Domestic) (F4211) is not equal

to <Null> And BC Accumulated Amount Invoiced (Domestic) (F4211) is not equal to <Zero> 0151 // At a minimum, the record has had a domestic amount on a c omponent invoice. 0152 VA frm_iProcessKitInvcCmpnt_INT01 = "1" 0153 Else 0154 If BC Accumulated Amount Invoiced (Foreign) (F4211) is not e qual to <Blank> And BC Accumulated Amount Invoiced (Foreign) (F4211) is not equa l to <Null> And BC Accumulated Amount Invoiced (Foreign) (F4211) is not equal to <Zero> 0155 // The record has had a foreign amount on a component inv oice. 0156 VA frm_iProcessKitInvcCmpnt_INT01 = "1" 0157 Else 0158 // In rare scenarios, the accumulated amount may be zero but component 0159 // invoicing has still occurred. Here we must compare th e parent's invoice 0160 // data to that of the component. 0161 If VA frm_mnKitParentLastLineNo_KTLN is not equal to BC K it Master Line Number (F4211) Or VA frm_mnKitParentLastOrdNo_DOCO is not equal t o BC Document (Order No, Invoice, etc.) (F4211) Or VA frm_szKitParentLastOrdTyp_ DCTO is not equal to BC Order Type (F4211) Or VA frm_szKitParentLastOrdCo_KCOO i s not equal to BC Order Company (Order Number) (F4211) 0162 VA frm_cKitParentDisplayed_EV01 = "0" 0163 VA frm_mnAccInvcAmtDom_KITAMTDOM = "0" 0164 VA frm_mnAccInvcAmtFor_KITAMTFOR = "0" 0165 VA frm_mnCalcAccAmtDom_KITAMTDOM = "0" 0166 VA frm_mnCalcAccAmtFor_KITAMTFOR = "0" 0167 VA frm_mnKitParentInvcNo_DOC = "0" 0168 VA frm_szKitParentInvoiceType_DCT = "0" 0169 VA frm_szKitParentInvcCompany_KCO = "0" 0170 VA frm_mnParentAmtExtPrice_AEXP = "0" 0171 VA frm_mnParentForAmtExtPrice_FEA = "0" 0172 Kit Invoicing Get And Store Kit Parent BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderNumber_DOCO BC Order Type (F4211) -> BF szOrderType_DCTO BC Order Company (Order Number) (F4211) -> BF szOrd erCompany_KCOO BC Kit Master Line Number (F4211) -> BF mnLineNumbe r_LNID VA frm_idV4211AGHandle_GENID <> BF idV4211AGHandle_ GENID VA frm_mnParentAmtExtPrice_AEXP <- BF mnAmountExten dedPrice_AEXP VA frm_mnParentForAmtExtPrice_FEA <- BF mnForeignAm tExtendedPrice_FEA VA frm_mnKitParentInvcNo_DOC <- BF mnDocumentNumber _DOC VA frm_szKitParentInvoiceType_DCT <- BF szDocumentT ype_DCT VA frm_szKitParentInvcCompany_KCO <- BF szDocumentC ompany_KCO VA frm_mnCalcAccAmtDom_KITAMTDOM <- BF mnCalcdDomAc cAmt_KITAMTDOM VA frm_mnCalcAccAmtFor_KITAMTFOR <- BF mnCalcdForAc cAmt_KITAMTFOR VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnKitInvoic ingCacheJobNo_JOBS

VA frm_mnAccInvcAmtDom_KITAMTDOM <- BF mnTblAccInvc AmtDom_KITAMTDOM VA frm_mnAccInvcAmtFor_KITAMTFOR <- BF mnTblAccInvc AmtFor_KITAMTFOR VA frm_cKitParentDisplayed_EV01 <- BF cKitParentPro cessed_EV01 0173 If SV Error_Status is not equal to CO ERROR 0174 If BC Currency Code - From (F4211) is not equal to <Blank> And BC Currency Code - From (F4211) is not equal to <Null> 0175 Decimals Trigger Get by CO CRCD BC Order Company (Order Number) (F4211) <> BF szCompany BC Currency Code - From (F4211) <> BF szTrans actionCurrencyCode VA frm_mnAccInvcAmtDom_KITAMTDOM <> BF mnDome sticAmount01 VA frm_mnCalcAccAmtDom_KITAMTDOM <> BF mnDome sticAmount02 VA frm_mnParentAmtExtPrice_AEXP <> BF mnDomes ticAmount03 VA frm_mnAccInvcAmtFor_KITAMTFOR <> BF mnFore ignAmount01 VA frm_mnCalcAccAmtFor_KITAMTFOR <> BF mnFore ignAmount02 VA frm_mnParentForAmtExtPrice_FEA <> BF mnFor eignAmount03 0176 End If 0177 VA frm_mnKitParentLastLineNo_KTLN = BC Kit Master L ine Number (F4211) 0178 VA frm_mnKitParentLastOrdNo_DOCO = BC Document (Ord er No, Invoice, etc.) (F4211) 0179 VA frm_szKitCmpntLastOrdType_DCTO = BC Order Type ( F4211) 0180 VA frm_szKitCmpntLastOrdCo_KCOO = BC Order Company (Order Number) (F4211) 0181 End If 0182 End If 0183 If VA frm_mnKitParentInvcNo_DOC is not equal to BC Docume nt (Voucher, Invoice, etc.) (F4211) Or VA frm_szKitParentInvoiceType_DCT is not equal to BC Document Type (F4211) Or VA frm_szKitParentInvcCompany_KCO is not eq ual to BC Document Company (F4211) 0184 VA frm_iProcessKitInvcCmpnt_INT01 = "1" 0185 End If 0186 End If 0187 End If 0188 End If 0189 End If 0190 // 0191 // Components lack extended prices but have accumulated amounts when component 0192 // invoicing occurred on the line. Swap accumulated amts. for the ex tended 0193 // amts. to accurately reflect component invoice amts. Note that thi s swap is 0194 // the first of two swaps. We will swap a calculated extended amt. f or the 0195 // accumulated invoice amt. when it comes time to display a component invoice 0196 // amt. Account for both currency possibilities so that kit invoicin g cache

0197 // records have both values. 0198 If VA frm_iProcessKitInvcCmpnt_INT01 is equal to "1" 0199 BC Amount - Extended Price (F4211) = BC Accumulated Amount Invoice d (Domestic) (F4211) 0200 BC Amount - Foreign Extended Price (F4211) = BC Accumulated Amount Invoiced (Foreign) (F4211) 0201 End If 0202 // 0203 // ======================================================= 0204 // Retrieve item info. for 1) UOM conversions, 2) bulk processing (SA R 0205 // #5704437), and 3) kit component invoicing (SAR #8150388). 0206 // ======================================================= 0207 // 0208 If FC IVI-Inventory Interface is equal to "Y" Or FC IVI-Inventory Int erface is equal to "D" 0209 F4101 Get Item Master Information BC Item Number - Short (F4211) -> BF mnShortItemNumber "1" -> BF cSuppressErrorMessage VA evt_cStockingType_STKT <- BF cStockingType VA frm_cBulkPackedFlag_BPFG <- BF cBulkPackedFlag VA frm_StdUOMConv_TFLA <- BF szStandardUOMConversion 0210 End If 0211 // 0212 // ======================================================= 0213 // SAR 8150388 - Kit Parent Processing: 1) Accumulated invoice amoun ts mean 0214 // component invoicing occurred. 2) Reduce extended amounts by any 0215 // accumulated amounts for calculations. Doing so ensures that we re flect 0216 // actual invoice amts. here. 3) Account for both currency possibili ties so 0217 // that kit invoicing cache records have both values. (Currency off 0218 // environments will be okay too.) 4) For performance reasons and co mponent 0219 // invoicing display (see Write Grid Line - After), write kit parent lines to 0220 // the kit invoicing cache. 0221 // ======================================================= 0222 // 0223 If VA evt_cStockingType_STKT is equal to "K" 0224 If BC Accumulated Amount Invoiced (Domestic) (F4211) is not equal to <Blank> And BC Accumulated Amount Invoiced (Domestic) (F4211) is not equal to <Zero> And BC Accumulated Amount Invoiced (Domestic) (F4211) is not equal to <N ull> 0225 VA frm_iProcessKitInvParent_INT01 = "1" 0226 Else 0227 If BC Accumulated Amount Invoiced (Foreign) (F4211) is not equa l to <Blank> And BC Accumulated Amount Invoiced (Foreign) (F4211) is not equal t o <Null> And BC Accumulated Amount Invoiced (Foreign) (F4211) is not equal to <Z ero> 0228 VA frm_iProcessKitInvParent_INT01 = "1" 0229 End If 0230 End If 0231 // 0232 If VA frm_iProcessKitInvParent_INT01 is equal to "1" 0233 VA frm_mnParentAmtExtPrice_AEXP = BC Amount - Extended Price (F 4211) 0234 BC Amount - Extended Price (F4211) = BC Amount - Extended Price (F4211)-BC Accumulated Amount Invoiced (Domestic) (F4211)

0235 VA frm_mnParentForAmtExtPrice_FEA = BC Amount - Foreign Extende d Price (F4211) 0236 BC Amount - Foreign Extended Price (F4211) = BC Amount - Foreig n Extended Price (F4211)-BC Accumulated Amount Invoiced (Foreign) (F4211) 0237 Else 0238 VA frm_mnAmountExtendedPrice_AEXP = BC Amount - Extended Price (F4211) 0239 VA frm_mnAmtForeignExtPrice_FEA = BC Amount - Foreign Extended Price (F4211) 0240 End If 0241 // 0242 VA frm_cKitParentDisplayed_EV01 = "1" 0243 VA frm_mnKitParentLastLineNo_KTLN = BC Line Number (F4211) 0244 VA frm_mnAccInvcAmtDom_KITAMTDOM = BC Accumulated Amount Invoiced (Domestic) (F4211) 0245 VA frm_mnAccInvcAmtFor_KITAMTFOR = BC Accumulated Amount Invoiced (Foreign) (F4211) 0246 VA frm_mnCalcAccAmtDom_KITAMTDOM = "0" 0247 VA frm_mnCalcAccAmtFor_KITAMTFOR = "0" 0248 VA frm_mnKitParentInvcNo_DOC = BC Document (Voucher, Invoice, etc. ) (F4211) 0249 VA frm_szKitParentInvoiceType_DCT = BC Document Type (F4211) 0250 VA frm_szKitParentInvcCompany_KCO = BC Document Company (F4211) 0251 If BC Currency Code - From (F4211) is not equal to <Blank> And BC Currency Code - From (F4211) is not equal to <Null> 0252 Decimals Trigger Get by CO CRCD BC Order Company (Order Number) (F4211) <> BF szCompany BC Currency Code - From (F4211) <> BF szTransactionCurrencyC ode VA frm_mnAccInvcAmtDom_KITAMTDOM <> BF mnDomesticAmount01 VA frm_mnCalcAccAmtDom_KITAMTDOM <> BF mnDomesticAmount02 VA frm_mnParentAmtExtPrice_AEXP <> BF mnDomesticAmount03 VA frm_mnAccInvcAmtFor_KITAMTFOR <> BF mnForeignAmount01 VA frm_mnCalcAccAmtFor_KITAMTFOR <> BF mnForeignAmount02 VA frm_mnParentForAmtExtPrice_FEA <> BF mnForeignAmount03 0253 End If 0254 // 0255 If VA frm_mnKitInvcngCacheJobNo_JOBS is greater than <Zero> 0256 // Add the record if we haven't done so already. 0257 Kit Invoicing Cache Add Update BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderN umber_DOCO BC Order Type (F4211) -> BF szOrderType_DCTO BC Order Company (Order Number) (F4211) -> BF szOrderCompany _KCOO BC Line Number (F4211) -> BF mnLineNumber_LNID VA frm_mnAccInvcAmtDom_KITAMTDOM -> BF mnDomesticAccAmtTbl_K ITAMTDOM VA frm_mnAccInvcAmtFor_KITAMTFOR -> BF mnForeignAccAmtTbl_KI TAMTFOR VA frm_mnCalcAccAmtDom_KITAMTDOM -> BF mnDomesticAccAmtNew_K ITAMTDOM VA frm_mnCalcAccAmtFor_KITAMTFOR -> BF mnForeignAccAmtNew_KI TAMTFOR VA frm_mnParentAmtExtPrice_AEXP -> BF mnAmountExtendedPrice_ AEXP VA frm_mnParentForAmtExtPrice_FEA -> BF mnForeignAmtExtended Price_FEA VA frm_cKitParentDisplayed_EV01 -> BF cUpdateF4211Flag_EV01 "1" -> BF iIndexNumber_INT01

"4" -> BF iNumberOfKeys_INT02 VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnJobNumber_JOBS VA frm_mnKitParentInvcNo_DOC -> BF mnDocVoucherInvoice_DOC VA frm_szKitParentInvoiceType_DCT -> BF szDocumentType_DCT VA frm_szKitParentInvcCompany_KCO -> BF szDocumentCompany_KC O 0258 0259 0260 umber_DOCO BC Order Type (F4211) -> BF szOrderType_DCTO BC Order Company (Order Number) (F4211) -> BF szOrderCompany _KCOO BC Line Number (F4211) -> BF mnLineNumber_LNID VA frm_mnAccInvcAmtDom_KITAMTDOM -> BF mnDomesticAccAmtTbl_K ITAMTDOM VA frm_mnAccInvcAmtFor_KITAMTFOR -> BF mnForeignAccAmtTbl_KI TAMTFOR <Zero> -> BF mnDomesticAccAmtNew_KITAMTDOM <Zero> -> BF mnForeignAccAmtNew_KITAMTFOR VA frm_mnParentAmtExtPrice_AEXP -> BF mnAmountExtendedPrice_ AEXP VA frm_mnParentForAmtExtPrice_FEA -> BF mnForeignAmtExtended Price_FEA VA frm_cKitParentDisplayed_EV01 -> BF cUpdateF4211Flag_EV01 VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnJobNumber_JOBS BC Document (Voucher, Invoice, etc.) (F4211) -> BF mnDocVouc herInvoice_DOC BC Document Type (F4211) -> BF szDocumentType_DCT BC Document Company (F4211) -> BF szDocumentCompany_KCO 0261 End If 0262 End If 0263 // 0264 // ======================================================= 0265 // If Backorders are to be included and Qty on Backorder is not 0, 0266 // convert the sum of Qty on Order + Qty on Backorder to a Qty in 0267 // Primary UoM. 0268 // ======================================================= 0269 // 0270 // SAR 8648451 - Do not block blank adjustment schedule name because direct 0271 // price has no schedule name saved in F4211. 0272 If FC EV02-Backorders Incl. is not equal to "1" And BC Units - Qty Ba ckordered/Held (F4211) is not equal to <Zero> Or VA frm_cAdvancedPricingYN_ADVP is equal to "Y" 0273 FC EKEY-Gen. Error Msg [HIDDEN] = " " 0274 If FC EV02-Backorders Incl. is not equal to "1" 0275 FC MATH01-Extend. Qty [HIDDEN] = BC Quantity Shipped (F4211)+BC Units - Qty Backordered/Held (F4211) 0276 Else 0277 FC MATH01-Extend. Qty [HIDDEN] = BC Quantity Shipped (F4211) 0278 End If 0279 F41002 Get Item UoM Conversion BC Business Unit (F4211) -> BF szBranchPlant BC Unit of Measure as Input (F4211) -> BF szFromUnitOfMeasure BC Unit of Measure - Pricing (F4211) -> BF szToUnitOfMeasure FC MATH01-Extend. Qty [HIDDEN] -> BF mnQuantityToConvert FC IVI-Inventory Interface [HIDDEN] -> BF cInventoryInterfaceFl Else Get Internal Next NUmber VA frm_mnKitInvcngCacheJobNo_JOBS <- BF mnJobnumberA Kit Invoicing Cache Add BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderN

ag FC CONV-Fact. To-to-Prim [HIDDEN] <- BF mnConversionFactorTo_to _Primar FC MATH02-Qty Prim Uom [HIDDEN] <- BF mnQuantityConvertedToPrim ary BC Committed (H/S) (F4211) -> BF cPotencyMode FC EKEY-Gen. Error Msg [HIDDEN] <- BF szErrorMessageID "1" -> BF cSuppressErrorMsg BC Item Number - Short (F4211) -> BF mnShortItemNumber VA frm_StdUOMConv_TFLA -> BF szStandardUOMConversion 0280 End If 0281 // 0282 // ** SAR# 4029409 SK6005857 03/16/00 0283 // Modified the If condition to check for nonstock items. 0284 If BC Line Type (F4211) is equal to "N" Or BC Units - Qty Backordere d/Held (F4211) is not equal to <Zero> And FC EV02-Backorders Incl. is not equal to "1" 0285 // ** End SAR# 4029409 0286 // 0287 // ======================================================= 0288 // We now have the Qty in Primary UoM and a Conversion Factor. 0289 // If the user has selected to include Backorders in ALL calcs (bu tton 0290 // 3), then also convert the unit price (or Foreign unit price) to reflect the 0291 // Qty in Primary UoM. 0292 // ======================================================= 0293 // 0294 If FC EV02-Backorders Incl. is equal to "3" 0295 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0296 If FC CONV-Fact. To-to-Prim is equal to "0" 0297 FC MATH03-To Uom Pric. [HIDDEN] = BC Amount - Price per U nit (F4211) 0298 Else 0299 FC MATH03-To Uom Pric. [HIDDEN] = BC Amount - Price per U nit (F4211)/FC CONV-Fact. To-to-Prim [HIDDEN] 0300 End If 0301 Else 0302 If FC CONV-Fact. To-to-Prim is equal to "0" 0303 FC MATH03-To Uom Pric. [HIDDEN] = BC Amount - Foreign Pri ce per Unit (F4211) 0304 Else 0305 FC MATH03-To Uom Pric. [HIDDEN] = BC Amount - Foreign Pri ce per Unit (F4211)/FC CONV-Fact. To-to-Prim [HIDDEN] 0306 End If 0307 End If 0308 FC MATH04-Net Amount [HIDDEN] = FC MATH03-To Uom Pric. [HIDDEN] *FC MATH02-Qty Prim Uom [HIDDEN] 0309 FC MATH04-Disc Net Amt [HIDDEN] = FC MATH04-Net Amount [HIDDEN] 0310 End If 0311 End If 0312 // 0313 // ======================================================= 0314 // If user has not selected Backorders to be included in ALL calcs, 0315 // OR the Amount Backordered is 0, Net Amount is simply the Extended Price 0316 // (or Foreign Extended Price) on the Sales Order record. Also, move Net Amount 0317 // to Discount Net Amountand check if Disc. Net Amount should be 0.

0318 // ======================================================= 0319 // 0320 If FC EV02-Backorders Incl. is not equal to "3" Or BC Units - Qty Bac kordered/Held (F4211) is equal to <Zero> 0321 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0322 FC MATH04-Net Amount [HIDDEN] = BC Amount - Extended Price (F42 11) 0323 Else 0324 FC MATH04-Net Amount [HIDDEN] = BC Amount - Foreign Extended Pr ice (F4211) 0325 End If 0326 FC MATH04-Disc Net Amt [HIDDEN] = FC MATH04-Net Amount [HIDDEN] 0327 // SAR 4583135 Begin 0328 ! If BC Quantity Shipped (F4211) is equal to <Zero> 0329 ! // 0330 ! // ** SAR# 4029409 SK6005857 03/16/00 0331 ! If BC Line Type (F4211) is not equal to "N" 0332 ! FC MATH04-Disc Net Amt [HIDDEN] = "0" 0333 ! End If 0334 ! // ** End SAR# 4029409. 0335 ! // 0336 ! End If 0337 // SAR 4583135 End 0338 End If 0339 // 0340 // 0341 If BC Date - Invoice (F4211) is not equal to <Null Date> 0342 VA frm_jdInvoiceDateForTax_IVD = BC Date - Invoice (F4211) 0343 Else 0344 VA frm_jdInvoiceDateForTax_IVD = BC Date - Order/Transaction (F421 1) 0345 End If 0346 // 0347 // Vertex changes, SAR#1469038, 12/21/98 0348 // SAR# 2800685 0349 // 0350 // Changed the check on Sales Taxable to check if tax is not equa l to N 0351 // instead of tax equal to Y because there are other tax types (3 -8). 0352 If VA frm_cIsvertexActive_VVTX is equal to "1" And BC Sales Taxable (Y/N) (F4211) is not equal to "N" 0353 ! Get Internal Next NUmber ! VA frm_mnVertexJobNumber_JOBS <- BF mnJobnumberA 0354 Load and Retrieve Vertex Cache "2" -> BF cCalledFromFlag BC Address Number - Ship To (F4211) -> BF mnSupplierOrShipTo VA frm_jdInvoiceDateForTax_IVD -> BF jdDateTransactionJulian BC Order Company (Order Number) (F4211) -> BF szCompany BC Business Unit - Header (F4211) -> BF szHeaderBranchPlant BC Business Unit (F4211) -> BF szDetailBranchPlant VA frm_mnVertexJobNumber_JOBS <> BF mnJobnumberA "1" -> BF cModeProcessing BC Item Number - Short (F4211) -> BF mnIdentifierShortItem BC Order Type (F4211) -> BF szOrderType BC Line Type (F4211) -> BF szLineType BC Tax Rate/Area (F4211) <> BF szShipToGeoCode BC Quantity Shipped (F4211) -> BF mnUnitsTransactionQty BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDocumentO

rderInvoiceE BC Order Company (Order Number) (F4211) -> BF szCompanyKeyOrder No "000" -> BF szOrderSuffix BC Line Number (F4211) -> BF mnLineNumber 0355 // 0356 // SAR 8003126 MD5644340 2/17/2006 0357 ! VA frm_Error = "078N" 0358 ! Delete Message(VA frm_Error) 0359 // 0360 End If 0361 // End SAR#1469038 0362 // ======================================================= 0363 // As long as there was no UoM Conversion error, continue..... 0364 // ======================================================= 0365 // 0366 If FC EKEY-Gen. Error Msg is equal to " " 0367 // 0368 // ======================================================= 0369 // Determine Qty Supplied for Tax Calculator. 0370 // ======================================================= 0371 // 0372 If FC EV02-Backorders Incl. is not equal to "3" Or BC Units - Qty Backordered/Held is equal to "0" 0373 FC MATH01-Qty Supplied [HIDDEN] = BC Quantity Shipped (F4211) 0374 Else 0375 FC MATH01-Qty Supplied [HIDDEN] = FC MATH02-Qty Prim Uom [HIDDE N] 0376 End If 0377 // 0378 // ======================================================= 0379 // Determine Item Grouping for Tax Calculator. Grouping depends o n 0380 // Sales Taxable flag. If 'Y', Item Grouping = Short Item Number. If '3' 0381 // to '8', Item Grouping = '3' to '8', otherwise Item Grouping = 0 . 0382 // Also at this point, the Net Amount for the Tax Summary array (T ax 0383 // Net Amount) takes on the value of the Discount Net Amount. If the 0384 // line is non-taxable, the Tax Net Amount is stored in the Zero T ax Net 0385 // Amount field, and the Tax Net Amount is set to zero. 0386 // ======================================================= 0387 FC MATH01-Zero Tax Net [HIDDEN] = "0" 0388 FC MATH02-Tax Net Amt [HIDDEN] = FC MATH04-Disc Net Amt [HIDDEN] 0389 // 0390 If BC Sales Taxable (Y/N) is equal to "Y" 0391 FC MATH08-Item Group. [HIDDEN] = BC Item Number - Short (F4211) 0392 Else 0393 If BC Sales Taxable (Y/N) is greater than or equal to "3" And B C Sales Taxable (Y/N) is less than or equal to "8" 0394 Character to Math Numeric, Convert BC Sales Taxable (Y/N) (F4211) -> BF cCharacter FC MATH08-Item Group. [HIDDEN] <- BF mnMathNumeric 0395 Else 0396 FC MATH08-Item Group. [HIDDEN] = "0" 0397 FC MATH01-Zero Tax Net [HIDDEN] = FC MATH02-Tax Net Amt [HID DEN]

0398 FC MATH02-Tax Net Amt [HIDDEN] = "0" 0399 End If 0400 End If 0401 // 0402 // ======================================================= 0403 // At this point we will call the Tax Calculator to extract tax de tails. This 0404 // This routine is called every time, using the Net Amount as the Goods Value. 0405 // Values returned by this function will be stored in the Discount storage array 0406 // and Tax storage arrays (using the AccumulateGetDiscountSummary and 0407 // AccumulateGetTaxSummary functions) EXCEPT if the line is non-ta xable, 0408 // a different discount calc. routine is used to extract discount details. 0409 // ======================================================= 0410 // 0411 FC STAM-Tax Amt of Tax [HIDDEN] = "0" 0412 // 0413 // BEGIN of codechange for SAR 2913794 0414 // 0415 If BC Sales Taxable (Y/N) (F4211) is equal to "N" Or BC Tax Rate/ Area (F4211) is equal to <Blank> And BC Tax Expl Code 1 (F4211) is equal to <Bl ank> 0416 // ============================================================ === 0417 // For non-taxable lines AND for taxable lines with NO taxes, c all Calculate 0418 // Discount Amount function to calculate the discount. 0419 // ============================================================ === 0420 // 0421 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equa l to "D" 0422 FC AEXP-Non-Tax Gross [HIDDEN] = BC Amount - Extended Price (F4211) 0423 Else 0424 End If 0425 // 0426 // SAR 5266975 - Do not calculate Discount if Discount Suppress ed 0427 If VA evt_cSuppressDiscount_EV01 is not equal to "1" 0428 Calculate Discount Amount No Taxes BC Payment Terms Code (F4211) <> BF szPaymentTermsCode FC AEXP-Non-Tax Gross [HIDDEN] <> BF mnAmountGross FC ADSC-Disc Avail Amt [HIDDEN] <- BF mnAmtDiscountAvaila ble 0429 Else 0430 FC ADSC-Disc Avail Amt [HIDDEN] = "0" 0431 End If 0432 // 0433 FC MATH02-Add. Dis. Amt [HIDDEN] = BC Amount - Extended Price ( F4211) 0434 Else 0435 FC AEXP-Non-Tax Gross [HIDDEN] = BC Amount - Foreign Extended P rice (F4211) 0436 // SAR 3276539 - Check for text line type, not line type "T" 0437 If VA evt_cTextLineYN_TEXO is not equal to "Y"

0438 // ========================================================= ====== 0439 // Forlines with taxes use the tax calculator 0440 // ========================================================= ====== 0441 // ======================================================= 0442 // Argentina localization begun 0443 // ======================================================= 0444 // 0445 If SL CountryCode is not equal to <Blank> 0446 // SAR#3628637, 1/18/99. Changed the direction of arrows on output parameters to 0447 // both directions inorder keep the values previously loa ded if nothing is 0448 // changed inside this function. 0449 // -------------------------------------------------------------------------0450 // SAR 6322713 - Currency mode should come from the F0015 0451 // Begin SAR # 8006941 - No need to check for exchange ra te if transaction and 0452 // base currencies are same 0453 VA frm_cCurrencyConvMethod_CRCM = "" 0454 If SL CurrencyProcessing is not equal to "N" 0455 If VA frm_szTransactionCurrency_CRCD is not equal to V A frm_szBaseCurrency_CRDC 0456 // End of SAR # 8006941 0457 F0015 Get Exchange Rate VA frm_szTransactionCurrency_CRCD -> BF szCurren cyCodeFrom VA frm_szBaseCurrency_CRDC -> BF szCurrencyCodeT o BC Address Number (F4211) -> BF mnAddressNumber BC Date - Order/Transaction (F4211) -> BF jdTran sactionDate VA frm_cCurrencyConvMethod_CRCM <- BF cConversio nMethod 0458 End If 0459 End If 0460 If VA frm_cCurrencyConvMethod_CRCM is equal to <Blank> Or VA frm_cCurrencyConvMethod_CRCM is equal to <Null> 0461 VA frm_cCurrencyConvMethod_CRCM = SL CurrencyProcessin g 0462 End If 0463 P42230 Plug & Play NER BC Company (F4211) -> BF szCompany "P42230" -> BF szProgramId "CHG" -> BF szFormAction BC Document (Order No, Invoice, etc.) (F4211) -> BF mn DocumentOrderInvoiceE BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szCompan yKeyOrderNo BC Line Number (F4211) -> BF mnLineNumber FC Document Company -> BF szCompanyKey FC Document Type -> BF szDocumentType FC Document Number -> BF mnDocVoucherInvoiceE BC Address Number (F4211) -> BF mnAddressNumber BC Address Number - Ship To (F4211) -> BF mnAddressNum berShipTo BC Item Number - Short (F4211) -> BF mnIdentifierShort

Item BC BC BC BC FC tyOrder BC Currency Conversion Rate - Spot Rate (F4211) -> BF mnCurrencyConverRateOv FC ADSC-Disc Avail Amt [HIDDEN] <> BF mnAmountDiscount Available FC STAM-Tax Amt of Tax [HIDDEN] <> BF mnAmtTax2 BC Tax Expl Code 1 (F4211) -> BF szTaxExplanationCode1 BC Payment Terms Code (F4211) -> BF szPaymentTermsCode 01 VA VA VA BC ureAsInput FC MATH04-Net Amount [HIDDEN] -> BF mnAmountTaxable FC TXR1-Tax Rate 1 (wf) [HIDDEN] <> BF mnTaxRate1 FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode FC Foreign -> BF cCurrencyMode P42230 Plug & Play NER BC Company (F4211) -> BF szCompany "P42230" -> BF szProgramId "CHG" -> BF szFormAction BC Document (Order No, Invoice, etc.) (F4211) -> BF BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szComp BC FC FC FC BC BC Line Number (F4211) -> BF mnLineNumber Document Company -> BF szCompanyKey Document Type -> BF szDocumentType Document Number -> BF mnDocVoucherInvoiceE Address Number (F4211) -> BF mnAddressNumber Address Number - Ship To (F4211) -> BF mnAddressN frm_cCurrencyConvMethod_CRCM -> BF CCCurrencyFlag frm_szComputerID <> BF szComputerID frm_mnJobnumber <> BF mnJobnumberA Unit of Measure as Input (F4211) -> BF szUnitOfMeas Tax Rate/Area (F4211) -> BF szTaxArea1 Business Unit (F4211) -> BF szCostCenter Date - Requested (F4211) -> BF jdTransactionDate Line Type (F4211) -> BF szLineType MATH01-Qty Supplied [HIDDEN] -> BF MnUnitsTPrimaryQ

0464 ! ! ! ! ! mnDocumentOrderInvoiceE ! ! anyKeyOrderNo ! ! ! ! ! ! umberShipTo ! rtItem ! ! ! ! ! yQtyOrder ! F mnCurrencyConverRateOv ! ntAvailable ! ! e1 ! de01 ! ! !

BC Item Number - Short (F4211) -> BF mnIdentifierSho BC BC BC BC FC Tax Rate/Area (F4211) -> BF szTaxArea1 Business Unit (F4211) -> BF szCostCenter Date - Requested (F4211) -> BF jdTransactionDate Line Type (F4211) -> BF szLineType MATH01-Qty Supplied [HIDDEN] -> BF MnUnitsTPrimar

BC Currency Conversion Rate - Spot Rate (F4211) -> B FC ADSC-Disc Avail Amt [HIDDEN] <> BF mnAmountDiscou FC STAM-Tax Amt of Tax [HIDDEN] <> BF mnAmtTax2 BC Tax Expl Code 1 (F4211) -> BF szTaxExplanationCod BC Payment Terms Code (F4211) -> BF szPaymentTermsCo SL CurrencyProcessing -> BF CCCurrencyFlag VA frm_szComputerID <> BF szComputerID VA frm_mnJobnumber <> BF mnJobnumberA

! BC Unit of Measure as Input (F4211) -> BF szUnitOfMe asureAsInput ! FC MATH04-Net Amount [HIDDEN] -> BF mnAmountTaxable ! FC TXR1-Tax Rate 1 (wf) [HIDDEN] <> BF mnTaxRate1 ! FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode ! FC Foreign -> BF cCurrencyMode 0465 // SAR 6322713 - END 0466 // -------------------------------------------------------------------------0467 End If 0468 // 0469 // Localization Argentina end 0470 // ======================================================= 0471 // SAR# 3055040 0472 // 0473 // Passed in the tax rate area variable instead of a BC value. 0474 ! Tax, Calculate for Sales and Purchasing ! BC Tax Rate/Area (F4211) -> BF szTaxArea1 ! BC Tax Expl Code 1 (F4211) -> BF szTaxExplanationCode1 ! BC Date - Order/Transaction (F4211) -> BF jdTransaction Date ! BC Payment Terms Code (F4211) -> BF szPaymentTermsCode1 ! BC Company (F4211) -> BF szCompany ! FC MATH08-Item Group. [HIDDEN] -> BF mnShortItemNumber ! FC MATH01-Qty Supplied [HIDDEN] -> BF mnUnitsPrimaryQty Order ! FC MATH04-Net Amount [HIDDEN] -> BF mnAmountTaxable ! FC STAM-Amount of Tax [HIDDEN] <- BF mnAmtTax2 ! FC ADSC-Disc Avail Amt [HIDDEN] <- BF mnAmtDiscountAvai lable ! FC TXR1-Tax Rate 1 (wf) [HIDDEN] <- BF mnTaxRate1 ! FC TXR2-Tax Rate 2 (wf) [HIDDEN] <- BF mnTaxRate2 ! FC TXR3-Tax Rate 3 (wf) [HIDDEN] <- BF mnTaxRate3 ! FC TXR4-Tax Rate 4 (wf) [HIDDEN] <- BF mnTaxRate4 ! FC TXR5-Tax Rate 5 (wf) [HIDDEN] <- BF mnTaxRate5 ! FC TA1-Tax Authority 1 [HIDDEN] <- BF mnTaxAuthority1A ! FC TA2-Tax Authority 2 [HIDDEN] <- BF mnTaxAuthority2 ! FC TA3-Tax Authority 3 [HIDDEN] <- BF mnTaxAuthority3 ! FC TA4-Tax Authority 4 [HIDDEN] <- BF mnTaxAuthority4 ! FC TA5-Tax Authority 5 [HIDDEN] <- BF mnTaxAuthority5 ! FC TC2-Calc Method 2 [HIDDEN] <- BF cTaxCalcMethod2 ! FC TT3-Tax Type 3 (wf) [HIDDEN] <- BF cTaxType3 ! FC TT4-Tax Type 4 (wf) [HIDDEN] <- BF cTaxType4 ! FC TT5-Tax Type 5 (wf) [HIDDEN] <- BF cTaxType5 ! FC TAXA-Tax Area Desc. [HIDDEN] <- BF szDescriptionTaxA rea ! FC TRAT-Total Area Rate [HIDDEN] <- BF mnTotalAreaTaxRa te ! FC FVTY-Factor Type (wf) [HIDDEN] <- BF cFactorValueTyp e ! FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode ! "1" -> BF cSystemCode ! FC EV09-Item Used Flag [HIDDEN] <- BF cItemNumberUsedFl ag ! VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumberA ! VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive ! VA frm_szAuthority1Desc_DL01 <- BF szAuthority1Desc ! VA frm_szAuthority3Desc_DL01 <- BF szAuthority3Desc ! VA frm_szAuthority2Desc_DL01 <- BF szAuthority2Desc

! VA frm_szAuthority5Desc_DL01 <- BF szAuthority5Desc ! VA frm_szAuthority4Desc_DL01 <- BF szAuthority4Desc ! BC Document (Order No, Invoice, etc.) (F4211) -> BF mnD ocumentOrderInvoiceE ! BC Order Type (F4211) -> BF szOrderType ! BC Order Company (Order Number) (F4211) -> BF szCompany KeyOrderNo ! "000" -> BF szOrderSuffix ! BC Line Number (F4211) -> BF mnLineNumber 0475 // SAR# 3055040 0476 // 0477 // SAR 3495310 Begin. 0478 // Passed in 4 into system code to fix issue of tax on gros s discount. 0479 VA frm_mnTaxableAmount_MATH04 = FC MATH04-Net Amount [HIDDEN ] 0480 // 0481 VA frm_szTaxRateArea_TXA1 = BC Tax Rate/Area (F4211) 0482 // SAR 5266975 - Add Suppress Discount flag. 0483 Tax, Calculate for Sales and Purchasing VA frm_szTaxRateArea_TXA1 <> BF szTaxArea1 BC Tax Expl Code 1 (F4211) -> BF szTaxExplanationCode1 VA frm_jdInvoiceDateForTax_IVD -> BF jdTransactionDate BC Payment Terms Code (F4211) -> BF szPaymentTermsCode1 BC Order Company (Order Number) (F4211) -> BF szCompany FC MATH08-Item Group. [HIDDEN] -> BF mnShortItemNumber FC MATH01-Qty Supplied [HIDDEN] -> BF mnUnitsPrimaryQtyOr der VA frm_mnTaxableAmount_MATH04 <> BF mnAmountTaxable FC STAM-Amount of Tax [HIDDEN] <- BF mnAmtTax2 FC ADSC-Disc Avail Amt [HIDDEN] <- BF mnAmtDiscountAvaila ble FC TXR1-Tax Rate 1 (wf) [HIDDEN] <- BF mnTaxRate1 FC TXR2-Tax Rate 2 (wf) [HIDDEN] <- BF mnTaxRate2 FC TXR3-Tax Rate 3 (wf) [HIDDEN] <- BF mnTaxRate3 FC TXR4-Tax Rate 4 (wf) [HIDDEN] <- BF mnTaxRate4 FC TXR5-Tax Rate 5 (wf) [HIDDEN] <- BF mnTaxRate5 FC TA1-Tax Authority 1 [HIDDEN] <- BF mnTaxAuthority1A FC TA2-Tax Authority 2 [HIDDEN] <- BF mnTaxAuthority2 FC TA3-Tax Authority 3 [HIDDEN] <- BF mnTaxAuthority3 FC TA4-Tax Authority 4 [HIDDEN] <- BF mnTaxAuthority4 FC TA5-Tax Authority 5 [HIDDEN] <- BF mnTaxAuthority5 FC TC2-Calc Method 2 [HIDDEN] <- BF cTaxCalcMethod2 FC TT3-Tax Type 3 (wf) [HIDDEN] <- BF cTaxType3 FC TT4-Tax Type 4 (wf) [HIDDEN] <- BF cTaxType4 FC TT5-Tax Type 5 (wf) [HIDDEN] <- BF cTaxType5 FC TAXA-Tax Area Desc. [HIDDEN] <- BF szDescriptionTaxAre a FC TRAT-Total Area Rate [HIDDEN] <- BF mnTotalAreaTaxRate FC FVTY-Factor Type (wf) [HIDDEN] <- BF cFactorValueType FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode "4" -> BF cSystemCode VA frm_SummaryLevelTaxCalculati <- BF cSummaryDetailFlag FC EV09-Item Used Flag [HIDDEN] <- BF cItemNumberUsedFlag VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumberA VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive VA frm_szAuthority1Desc_DL01 <- BF szAuthority1Desc VA frm_szAuthority3Desc_DL01 <- BF szAuthority3Desc VA frm_szAuthority2Desc_DL01 <- BF szAuthority2Desc VA frm_szAuthority5Desc_DL01 <- BF szAuthority5Desc

VA frm_szAuthority4Desc_DL01 <- BF szAuthority4Desc BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDoc umentOrderInvoiceE BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szCompanyKe yOrderNo 0484 0485 DEN] 0486 End If 0487 End If 0488 // 0489 // END of codechange for SAR 2913794 0490 // 0491 // 0492 // ======================================================= 0493 // If a Cash Discount is allowed for this line, calculate any addi tional 0494 // cash discounts and call the Discount Store/Get routine in store 0495 // mode. 0496 // ======================================================= 0497 // 0498 If FC CDSC-Discnt Allowed is equal to "Y" 0499 If BC Discount % - Cash is greater than "0" 0500 FC ADSC-Disc Avail Amt [HIDDEN] = FC ADSC-Disc Avail Amt [HI DDEN]+(FC MATH02-Add. Dis. Amt [HIDDEN]*(BC Discount % - Cash (F4211)/100)) 0501 End If 0502 // 0503 // SAR# 2932725 0504 // 0505 // If Cash Discount is not allowed set the discount to zero for the discount 0506 // array 0507 // 0508 Else 0509 FC ADSC-Disc Avail Amt [HIDDEN] = "0" 0510 End If 0511 F4211 Accumulate Payment Term Discount "1" <> BF cStoreGetOrInitialize BC Payment Terms Code (F4211) <> BF szPaymentTermsCode FC MATH04-Disc Net Amt [HIDDEN] <> BF mnExtendedPrice <Zero> <> BF mnForeignExtendedPrice FC ADSC-Disc Avail Amt [HIDDEN] <> BF mnDiscountAmount <Zero> <> BF mnForeignDiscountAmount <Zero> <> BF cSuppressErrorMsg FC GENLNG-Discount Ptr. [HIDDEN] <> BF idPtrToDiscountList 0512 // 0513 // ======================================================= 0514 // If the Tax Rate/Area is not blank, check on whether the Tax Amo unt of Tax 0515 // needs to be overridden to ZERO, then store the tax data in the arrays using 0516 // the Store/Get Tax function in store mode. 0517 // ======================================================= 0518 // 0519 // SAR 3276539 - Check for text line type, not line type "T" 0520 If BC Tax Rate/Area (F4211) is greater than <Blank> And VA evt_cT extLineYN_TEXO is not equal to "Y" "000" -> BF szOrderSuffix BC Line Number (F4211) -> BF mnLineNumber // SAR 3495310 End. FC STAM-Tax Amt of Tax [HIDDEN] = FC STAM-Amount of Tax [HID

0521 If FC MATH02-Tax Net Amt is equal to "0" 0522 FC STAM-Tax Amt of Tax [HIDDEN] = "0" 0523 End If 0524 // 0525 // SAR# 3055040 0526 If BC Sales Taxable (Y/N) (F4211) is not equal to "N" 0527 // SAR 4113387 Begin 0528 If BC Sales Taxable (Y/N) (F4211) is equal to "Y" 0529 VA evt_mnItemGrpForTaxSumm_MATH08 = "1" 0530 Else 0531 If BC Sales Taxable (Y/N) (F4211) is greater than or equa l to "3" And BC Sales Taxable (Y/N) (F4211) is less than or equal to "8" 0532 VA evt_mnItemGrpForTaxSumm_MATH08 = FC MATH08-Item Gro up. [HIDDEN] 0533 End If 0534 End If 0535 If VA frm_cIsvertexActive_VVTX is equal to "1" And VA frm_c VertexAlreadyChecked_EV01 is not equal to "1" 0536 Validate GeoCode BC Tax Expl Code 1 (F4211) -> BF szTaxExplanationCode VA frm_szTaxRateArea_TXA1 -> BF szTaxRateArea VA frm_cValidGeoCode_EV01 <- BF cGeoCodeValid 0537 VA frm_cVertexAlreadyChecked_EV01 = "1" 0538 End If 0539 If VA frm_cValidGeoCode_EV01 is equal to "1" And VA frm_cIs vertexActive_VVTX is equal to "1" 0540 // SAR# 5044361 BEGIN 0541 F4211 Accumulate Sales Tax Summary "1" <> BF cStoreGetOrInitialize "N" <> BF cStoreTaxAreaExplCode VA frm_szTaxRateArea_TXA1 <> BF szTaxArea BC Tax Expl Code 1 (F4211) <> BF szTaxExplanationCode FC TAXA-Tax Area Desc. [HIDDEN] <> BF szTaxAreaDesc VA frm_mnTaxableAmount_MATH04 <> BF mnTaxableAmount FC STAM-Tax Amt of Tax [HIDDEN] <> BF mnAmountOfTax <Zero> <> BF mnForeignTaxableAmount <Zero> <> BF mnForeignTaxAmount FC TRAT-Total Area Rate [HIDDEN] <> BF mnTotalTaxRateB yArea FC FVTY-Factor Type (wf) [HIDDEN] <> BF cFactorType BC Sales Taxable (Y/N) (F4211) <> BF cTaxableYN VA evt_mnItemGrpForTaxSumm_MATH08 <> BF mnShortItemNum ber FC MATH01-Zero Tax Net [HIDDEN] <> BF mnTaxableAmountN et FC TXR1-Tax Rate 1 (wf) [HIDDEN] <> BF mnTaxRate1 FC TXR2-Tax Rate 2 (wf) [HIDDEN] <> BF mnTaxRate2 FC TXR3-Tax Rate 3 (wf) [HIDDEN] <> BF mnTaxRate3 FC TXR4-Tax Rate 4 (wf) [HIDDEN] <> BF mnTaxRate4 BC Line Number (F4211) <> BF mnTaxRate5 FC TA1-Tax Authority 1 [HIDDEN] <> BF mnTaxAuthority1 FC TA2-Tax Authority 2 [HIDDEN] <> BF mnTaxAuthority2 FC TA3-Tax Authority 3 [HIDDEN] <> BF mnTaxAuthority3 FC TA4-Tax Authority 4 [HIDDEN] <> BF mnTaxAuthority4 VA frm_mnVertexJobNumber_JOBS <> BF mnTaxAuthority5 FC TC2-Calc Method 2 [HIDDEN] <> BF cTaxCalcMethod FC TT3-Tax Type 3 (wf) [HIDDEN] <> BF cTaxType3 FC TT4-Tax Type 4 (wf) [HIDDEN] <> BF cTaxType4 FC TT5-Tax Type 5 (wf) [HIDDEN] <> BF cTaxType5 <Zero> <> BF cControlFlag

FC GENLN2-Grp Array Ptr. [HIDDEN] <> BF idPtrToGroupAr ray FC GENLN3-Area Arr. Ptr. [HIDDEN] <> BF idPtrToAreaAnd Authority FC ERRC-Gen. Error Flag [HIDDEN] <> BF cErrorCode <Zero> <> BF cSuppressErrorMsg <Zero> <> BF mnForeignNonTaxableAmt VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive VA frm_szAuthority1Desc_DL01 -> BF szAuthority1Descrip tion VA frm_szAuthority2Desc_DL01 -> BF szAuthority2Descrip tion VA frm_szAuthority3Desc_DL01 -> BF szAuthority3Descrip tion VA frm_szAuthority4Desc_DL01 -> BF szAuthority4Descrip tion VA frm_szAuthority5Desc_DL01 -> BF szAuthority5Descrip tion 0542 0543 VA frm_jdInvoiceDateForTax_IVD -> BF jdDateTax Else F4211 Accumulate Sales Tax Summary "1" <> BF cStoreGetOrInitialize "N" <> BF cStoreTaxAreaExplCode BC Tax Rate/Area (F4211) <> BF szTaxArea BC Tax Expl Code 1 (F4211) <> BF szTaxExplanationCode FC TAXA-Tax Area Desc. [HIDDEN] <> BF szTaxAreaDesc VA frm_mnTaxableAmount_MATH04 <> BF mnTaxableAmount FC STAM-Tax Amt of Tax [HIDDEN] <> BF mnAmountOfTax <Zero> <> BF mnForeignTaxableAmount <Zero> <> BF mnForeignTaxAmount FC TRAT-Total Area Rate [HIDDEN] <> BF mnTotalTaxRateB FC FVTY-Factor Type (wf) [HIDDEN] <> BF cFactorType BC Sales Taxable (Y/N) (F4211) <> BF cTaxableYN VA evt_mnItemGrpForTaxSumm_MATH08 <> BF mnShortItemNum ber FC MATH01-Zero Tax Net [HIDDEN] <> BF mnTaxableAmountN et FC TXR1-Tax Rate 1 (wf) [HIDDEN] <> BF mnTaxRate1 FC TXR2-Tax Rate 2 (wf) [HIDDEN] <> BF mnTaxRate2 FC TXR3-Tax Rate 3 (wf) [HIDDEN] <> BF mnTaxRate3 FC TXR4-Tax Rate 4 (wf) [HIDDEN] <> BF mnTaxRate4 FC TXR5-Tax Rate 5 (wf) [HIDDEN] <> BF mnTaxRate5 FC TA1-Tax Authority 1 [HIDDEN] <> BF mnTaxAuthority1 FC TA2-Tax Authority 2 [HIDDEN] <> BF mnTaxAuthority2 FC TA3-Tax Authority 3 [HIDDEN] <> BF mnTaxAuthority3 FC TA4-Tax Authority 4 [HIDDEN] <> BF mnTaxAuthority4 FC TA5-Tax Authority 5 [HIDDEN] <> BF mnTaxAuthority5 FC TC2-Calc Method 2 [HIDDEN] <> BF cTaxCalcMethod FC TT3-Tax Type 3 (wf) [HIDDEN] <> BF cTaxType3 FC TT4-Tax Type 4 (wf) [HIDDEN] <> BF cTaxType4 FC TT5-Tax Type 5 (wf) [HIDDEN] <> BF cTaxType5 "1" -> BF cControlFlag FC GENLN2-Grp Array Ptr. [HIDDEN] <> BF idPtrToGroupAr ray FC GENLN3-Area Arr. Ptr. [HIDDEN] <> BF idPtrToAreaAnd Authority FC ERRC-Gen. Error Flag [HIDDEN] <> BF cErrorCode <Zero> <> BF cSuppressErrorMsg <Zero> <> BF mnForeignNonTaxableAmt

yArea

VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive VA frm_szAuthority1Desc_DL01 -> BF szAuthority1Descrip tion VA frm_szAuthority2Desc_DL01 -> BF szAuthority2Descrip tion VA frm_szAuthority3Desc_DL01 -> BF szAuthority3Descrip tion VA frm_szAuthority4Desc_DL01 -> BF szAuthority4Descrip tion VA frm_szAuthority5Desc_DL01 -> BF szAuthority5Descrip tion VA frm_jdInvoiceDateForTax_IVD -> BF jdDateTax 0544 // SAR# 5044361 END 0545 End If 0546 End If 0547 // SAR 4113387 End 0548 // End of SAR# 3055040 0549 End If 0550 // 0551 // ======================================================= 0552 // Accumulate Total Taxable Amount and calculate Total Tax Amount. 0553 // ======================================================= 0554 // 0555 If BC Sales Taxable (Y/N) (F4211) is not equal to "N" And FC ERRCGen. Error Flag is not equal to "Y" 0556 // SAR 3495310 Begin. 0557 // Sumup the total taxable amount using the VA mnTaxableAmount VAR. 0558 // 0559 FC ATXA-Tot.Taxable Amt [HIDDEN] = FC ATXA-Tot.Taxable Amt [HID DEN]+VA frm_mnTaxableAmount_MATH04 0560 // SAR 3495310 End. 0561 // SAR# 2694616 0562 // 0563 // Sum up the total tax amounts instead of multiplying it a t the end because 0564 // there may be different tax rates involved in a sales ord er. 0565 // 0566 ! FC STAM-Total Tax Amt. [HIDDEN] = FC ATXA-Tot.Taxable Amt [HI DDEN]*FC TRAT-Total Area Rate [HIDDEN] 0567 FC STAM-Total Tax Amt. [HIDDEN] = FC STAM-Total Tax Amt. [HIDDE N]+FC STAM-Tax Amt of Tax [HIDDEN] 0568 End If 0569 // 0570 // ======================================================= 0571 // Accumulate Order Total - It is the sum of the Extended Prices. 0572 // ======================================================= 0573 // 0574 FC MATH05-Order Total [HIDDEN] = FC MATH05-Order Total [HIDDEN]+FC MATH04-Net Amount [HIDDEN] 0575 // 0576 // ======================================================= 0577 // Determine if a Tax Rate percentage should be displayed or "N/A" . "N/A" is 0578 // displayed if either the Taxable Flag, Tax Area or Tax Rate chan ges OR if the 0579 // Item Grouping changes, the Item Number was used to retrieve the tax details 0580 // and the Tax Area and Taxable Flag did not change.

0581 // ======================================================= 0582 // 0583 // SAR 3276539 - Check for text line type, not line type "T" 0584 // SAR 4041088 Begin 0585 // Ignore non-taxable lines. 0586 If VA evt_cTextLineYN_TEXO is not equal to "Y" And BC Sales Taxab le (Y/N) (F4211) is not equal to "N" 0587 ! If FC VC01A-Store Taxable is equal to " " 0588 ! FC VC01A-Store Taxable [HIDDEN] = BC Sales Taxable (Y/N) ( F4211) 0589 ! End If 0590 ! If FC VC01A-Store Taxable is not equal to BC Sales Taxable (Y /N) 0591 ! FC EV07-Chg in Tax SW [HIDDEN] = "1" 0592 ! End If 0593 // 0594 If FC VC10A-Store Tax Area is equal to " " 0595 FC VC10A-Store Tax Area [HIDDEN] = BC Tax Rate/Area (F4211) 0596 End If 0597 If FC VC10A-Store Tax Area is not equal to BC Tax Rate/Area 0598 FC EV07-Chg in Tax SW [HIDDEN] = "1" 0599 End If 0600 // 0601 If FC TRAT-Store Tax Rate is equal to "0" 0602 FC TRAT-Store Tax Rate [HIDDEN] = FC TRAT-Total Area Rate [H IDDEN] 0603 End If 0604 // 0605 // ** Begin SAR# 4217400 SK6005857 05/17/00 0606 // Mayer "Tax Rate N/A" fix begin 0607 If FC TRAT-Store Tax Rate is not equal to FC TRAT-Total Area Ra te And FC TRAT-Total Area Rate is not equal to <Zero> 0608 FC EV07-Chg in Tax SW [HIDDEN] = "1" 0609 End If 0610 // End SAR# 4217400 SK60057 05/17/00 0611 // Mayer "Tax Rate N/A" fix end 0612 // 0613 If FC MATH08-Store Item is equal to "0" And FC EV09-Item Used F lag is equal to "1" 0614 FC MATH08-Store Item [HIDDEN] = FC MATH08-Item Group. [HIDDE N] 0615 End If 0616 If FC MATH08-Store Item is not equal to "0" 0617 If FC MATH08-Store Item is not equal to FC MATH08-Item Group . And FC VC01A-Store Taxable is equal to BC Sales Taxable (Y/N) And FC VC10A-Sto re Tax Area is equal to BC Tax Rate/Area 0618 FC EV07-Chg in Tax SW [HIDDEN] = "1" 0619 End If 0620 End If 0621 End If 0622 // SAR 4041088 End 0623 // 0624 // ======================================================= 0625 // Determine if Generic Text exists for the grid line. 0626 // ======================================================= 0627 // 0628 FC EV01-Row Attachment [HIDDEN] = "0" 0629 Media Objects(GT4211A , <Exist>, FC EV01-Row Attachment, BC Docu ment (Order No, Invoice, etc.), BC Order Type, BC Document Company (Order Number ), BC Line Number, )

0630 If FC EV01-Row Attachment is equal to "1" 0631 Set Grid Text Indicator(FC Grid, <Current Row>, <Yes>, ) 0632 End If 0633 // 0634 // =============================================================== ========== 0635 // Add 1 to Record Count. 0636 // =============================================================== ========== 0637 // 0638 FC MATH06-Rec. Count [HIDDEN] = FC MATH06-Rec. Count [HIDDEN]+1 0639 End If 0640 End If 0641 End If 0642 // SAR# 4648664 Begin 0643 // Call B4202140 to load commission information into F42UI005, inorder to 0644 // display commission amounts in P42170 0645 If PO cBypassProcessCommissions is not equal to "1" 0646 If BC Address Number (F4211) is not equal to VA frm_PreviousAddressNumbe r_AN8 0647 F0101 Get AB Reporting Codes BC Address Number (F4211) -> BF mnAddressnumber VA frm_ReportCodeAddBook001 <- BF szReportcodeaddbook001 VA frm_ReportCodeAddBook004 <- BF szReportcodeaddbook004 0648 End If 0649 // Load Sales order line information into the commission accruals cache by 0650 // calling B4202140 in Mode '0' 0651 Calculate Commission Amounts BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDocumentOrderIn voiceE BC Order Type (F4211) -> BF szOrderType BC Company (F4211) -> BF szCompanyKeyOrderNo BC Line Number (F4211) -> BF mnLineNumber BC Date - Order/Transaction (F4211) -> BF jdDateTransactionJulian VA frm_ReportCodeAddBook001 -> BF szReportCodeAddBook001 VA frm_ReportCodeAddBook004 -> BF szReportCodeAddBook004 VA frm_ReportCodeAddBook004 -> BF szSalesReportingCode2 BC Freight Handling Code (F4211) -> BF szFreightHandlingCode BC Amount - Extended Cost (F4211) -> BF mnAmountTotalLineCost BC Amount - Extended Price (F4211) -> BF mnAmountExtendedPrice <Zero> -> BF cModeProcessing BC Currency Code - From (F4211) -> BF szCurrencyCodeFrom VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumber VA frm_szComputerID_CTID -> BF szComputerID <Blank> -> BF cOrderLevelCommissions 0652 // SAR# 5717289 Begin 0653 If VA frm_cFirstPass_EV01 is equal to "1" 0654 VA frm_mnPreviousDOCO = BC Document (Order No, Invoice, etc.) (F4211) 0655 VA frm_szPreviousDCTO = BC Order Type (F4211) 0656 VA frm_szPreviousKCOO = BC Order Company (Order Number) (F4211) 0657 VA frm_PreviousAddressNumber_AN8 = BC Address Number (F4211) 0658 End If 0659 If BC Document (Order No, Invoice, etc.) (F4211) is not equal to VA frm_ mnPreviousDOCO Or BC Order Type (F4211) is not equal to VA frm_szPreviousDCTO Or BC Order Company (Order Number) (F4211) is not equal to VA frm_szPreviousKCOO 0660 ! If PO cOrderLevelCommissions is equal to "1" 0661 ! // Accumulate Order level amounts by calling B4202140 in Mode '1 ' 0662 ! Calculate Commission Amounts

! VA frm_mnPreviousDOCO -> BF mnDocumentOrderInvoiceE ! VA frm_szPreviousDCTO -> BF szOrderType ! VA frm_szPreviousKCOO -> BF szCompanyKeyOrderNo ! "1" -> BF cModeProcessing ! VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumber ! VA frm_szComputerID_CTID -> BF szComputerID ! <Blank> -> BF cOrderLevelCommissions 0663 ! End If 0664 // Calculate commission amounts either at line level or order level b y calling 0665 // B4202140 in mode '2' 0666 Calculate Commission Amounts VA frm_mnPreviousDOCO -> BF mnDocumentOrderInvoiceE VA frm_szPreviousDCTO -> BF szOrderType VA frm_szPreviousKCOO -> BF szCompanyKeyOrderNo "2" -> BF cModeProcessing <Zero> -> BF cProofOrFinal VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumber VA frm_szComputerID_CTID -> BF szComputerID <Blank> -> BF cOrderLevelCommissions 0667 VA frm_mnPreviousDOCO = BC Document (Order No, Invoice, etc.) (F4211) 0668 VA frm_szPreviousDCTO = BC Order Type (F4211) 0669 VA frm_szPreviousKCOO = BC Order Company (Order Number) (F4211) 0670 VA frm_PreviousAddressNumber_AN8 = BC Address Number (F4211) 0671 End If 0672 If VA frm_cFirstPass_EV01 is equal to "1" 0673 VA frm_cFirstPass_EV01 = "0" 0674 End If 0675 End If 0676 // End SAR# 5717289 0677 // 0678 // SAR 5716235 - Accumulate freight changes by sales order. 0679 If PO cProcessFreightEstimate is equal to "1" And VA frm_cIsTransportSysAct ive_EV01 is equal to "1" 0680 If BC Document (Order No, Invoice, etc.) (F4211) is not equal to VA frm_ mnPrevDOCOForFreight_DOCO Or BC Order Type (F4211) is not equal to VA frm_szPrev DCTOForFreight_DCTO Or BC Order Company (Order Number) (F4211) is not equal to V A frm_szPrevKCOOForFreight_KCOO 0681 // 0682 Freight Quote in Online Invoice BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDocumentOrde rInvoiceE BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szCompanyKeyOrderNo VA frm_mnDomesticFreightChrg_FRCC <- BF mnDomesticEstimatedCharges VA frm_mnForeignFreightChrg_FRCF <- BF mnForeignEstimatedCharges 0683 // 0684 VA frm_mnDomFreightChgAccum_FRCC = VA frm_mnDomFreightChgAccum_FRCC+V A frm_mnDomesticFreightChrg_FRCC 0685 VA frm_mnForFreightChgAccum_FRCF = VA frm_mnForFreightChgAccum_FRCF+V A frm_mnForeignFreightChrg_FRCF 0686 // 0687 VA frm_mnPrevDOCOForFreight_DOCO = BC Document (Order No, Invoice, et c.) (F4211) 0688 VA frm_szPrevDCTOForFreight_DCTO = BC Order Type (F4211) 0689 VA frm_szPrevKCOOForFreight_KCOO = BC Order Company (Order Number) (F 4211) 0690 End If 0691 End If

----------------------------------------------------------------------EVENT: Write Grid Line-Before ----------------------------------------------------------------------0001 // 0002 // ======================================================= 0003 // The Quantity displayed depends on the user selections. If no 0004 // backorders are to be included, or if Qty Backordered is 0, use Qty 0005 // Supplied from file, otherwise use the Qty in Primary UoM (calculated 0006 // as sum of Qty Supplied + Qty on Backorder (in primary uom) at Grid 0007 // Record is Fetched event) and highlight the field. 0008 // ======================================================= 0009 // 0010 If FC EV02-Backorders Incl. is equal to "1" Or BC Units - Qty Backordered/H eld is equal to "0" 0011 GC Quantity = BC Quantity Shipped (F4211) 0012 If GC Quantity is less than "0" 0013 Set Grid Font(FC Grid, <Current Row>, GC Quantity, <,Regular,10,Red> ) 0014 End If 0015 Else 0016 GC Quantity = FC MATH01-Extend. Qty [HIDDEN] 0017 If GC Quantity is less than "0" 0018 Set Grid Font(FC Grid, <Current Row>, GC Quantity, <,Bold,9,Red>) 0019 Else 0020 Set Grid Font(FC Grid, <Current Row>, GC Quantity, <,Bold,9,Black>) 0021 End If 0022 End If 0023 // 0024 // ======================================================= 0025 // Extended Price is also calculated in Grid Rec. Fetched event. 0026 // ======================================================= 0027 // 0028 GC ExtendedPrice = FC MATH04-Net Amount [HIDDEN] 0029 If GC ExtendedPrice is less than <Zero> 0030 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Regular,9,Red> ) 0031 End If 0032 // 0033 // ======================================================= 0034 // Calculate Unit Weight & Volume. It is the total weight/volume of the 0035 // line less the weight/volume of any cancelled quantities, less the 0036 // weight/volume of any backordered quantities. Note: we will not 0037 // remove the weight/volume of the backordered qtys when the user 0038 // has selected in include backorders in ALL calcs. 0039 // ======================================================= 0040 // 0041 FC WTLB-Unit Weight (wf) [HIDDEN] = BC Unit Weight (F4211) 0042 If BC Units - Quantity Canceled/Scrapped is not equal to "0" 0043 FC WTLB-Unit Weight (wf) [HIDDEN] = FC WTLB-Unit Weight (wf) [HIDDEN]-(B C Units - Quantity Canceled/Scrapped (F4211)*(BC Unit Weight (F4211)/BC Units Order/Transaction Quantity (F4211))) 0044 End If 0045 If FC EV02-Backorders Incl. is not equal to "3" And BC Units - Qty Backorde red/Held is not equal to "0" 0046 FC WTLB-Unit Weight (wf) [HIDDEN] = FC WTLB-Unit Weight (wf) [HIDDEN]-(B C Units - Qty Backordered/Held (F4211)*(BC Unit Weight (F4211)/BC Units - Order/ Transaction Quantity (F4211))) 0047 End If 0048 GC Ext.Weight = FC WTLB-Unit Weight (wf) [HIDDEN] 0049 //

0050 FC ITVL-Unit Volume (wf) [HIDDEN] = BC Unit Volume (F4211) 0051 If BC Units - Quantity Canceled/Scrapped is not equal to "0" 0052 FC ITVL-Unit Volume (wf) [HIDDEN] = FC ITVL-Unit Volume (wf) [HIDDEN]-(B C Units - Quantity Canceled/Scrapped (F4211)*(BC Unit Volume (F4211)/BC Units Order/Transaction Quantity (F4211))) 0053 End If 0054 If FC EV02-Backorders Incl. is not equal to "3" And BC Units - Qty Backorde red/Held is not equal to "0" 0055 FC ITVL-Unit Volume (wf) [HIDDEN] = FC ITVL-Unit Volume (wf) [HIDDEN]-(B C Units - Qty Backordered/Held (F4211)*(BC Unit Volume (F4211)/BC Units - Order/ Transaction Quantity (F4211))) 0056 End If 0057 GC Ext.Volume = FC ITVL-Unit Volume (wf) [HIDDEN] 0058 // 0059 // ======================================================= 0060 // Weight & Volume Unit of Measures are retrieved from the F4211 0061 // table. If these are blank however, the Weight/Volume Unit of 0062 // Measure from the Item Master F4101 table is used. 0063 // ======================================================= 0064 // 0065 If BC Weight Unit of Measure is equal to " " Or BC Volume Unit of Measure i s equal to " " 0066 If FC IVI-Inventory Interface is equal to "Y" Or FC IVI-Inventory Interf ace is equal to "D" 0067 F4101 Get Item Master Row by Short Item BC Item Number - Short (F4211) <> BF mnShortItemNumber FC GENLNG-Pointr F4101 [HIDDEN] <- BF idF4101LongRowPtr FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode "1" <> BF cReturnPtr <Zero> <> BF cSuppressErrorMsg 0068 If FC ERRC-Gen. Error Flag is not equal to "Y" And FC ERRC-Gen. Error Flag is not equal to "1" 0069 F4101 Get Item Units Of Measure GC UM <- BF szWeightUom GC UM <- BF szVolumeUom FC GENLNG-Pointr F4101 [HIDDEN] <> BF idF4101GenericLong 0070 Memory, Free Ptr To Data Structure FC GENLNG-Pointr F4101 [HIDDEN] <> BF idGenericLong 0071 End If 0072 End If 0073 End If 0074 If BC Weight Unit of Measure is greater than " " 0075 GC UM = BC Weight Unit of Measure (F4211) 0076 End If 0077 If BC Volume Unit of Measure is greater than " " 0078 GC UM = BC Volume Unit of Measure (F4211) 0079 End If 0080 // 0081 // ======================================================= 0082 // Accumulate Total Weight & Total Volume. They are the totals of the 0083 // Weight & Volume columns. However, if the Weight/Volume Unit of 0084 // Measures differ from the Display Weight/Volume Unit of Measures 0085 // on the Sales Order Header file, convert the line Weight/Volume to 0086 // the Display Weight/Volume, which is added to the total. Also, kit 0087 // lines are not included in the totals. 0088 // ======================================================= 0089 // 0090 FC EKEY-Gen. Error Msg [HIDDEN] = " " 0091 If BC Item Number - Related (Kit) is equal to " " 0092 FC CONV-Fact. Fr-to-To [HIDDEN] = "1"

0093 // SAR 5456728, Add FC WUMD-Disp not equal to NULL to following if condi tion 0094 IfGC UMis not equal toFC WUMD-Disp Wght UomAndGC UMis not equal to<Blank >AndFC WUMD-Disp Wght Uomis not equal to<Blank>AndFC WUMD-Disp Wght Uomis not eq ual to<Null> 0095 F41002 Get Item UoM Conversion BC Business Unit (F4211) -> BF szBranchPlant GC UM -> BF szFromUnitOfMeasure FC WUMD-Disp Wght Uom [HIDDEN] -> BF szToUnitOfMeasure FC WTLB-Unit Weight (wf) [HIDDEN] -> BF mnQuantityToConvert FC IVI-Inventory Interface [HIDDEN] -> BF cInventoryInterfaceFlag FC CONV-Fact. Fr-to-To [HIDDEN] <- BF mnConversionFactorFrom_to_To BC Committed (H/S) (F4211) -> BF cPotencyMode FC EKEY-Gen. Error Msg [HIDDEN] <- BF szErrorMessageID "1" -> BF cSuppressErrorMsg BC Item Number - Short (F4211) -> BF mnShortItemNumber VA frm_StdUOMConv_TFLA -> BF szStandardUOMConversion 0096 End If 0097 If FC EKEY-Gen. Error Msg is equal to <Blank> And FC CONV-Fact. Fr-to-T o is not equal to <Zero> 0098 FC WTLB-Total Weight [HIDDEN] = FC WTLB-Total Weight [HIDDEN]+(FC WTL B-Unit Weight (wf) [HIDDEN]*FC CONV-Fact. Fr-to-To [HIDDEN]) 0099 End If 0100 // 0101 FC CONV-Fact. Fr-to-To [HIDDEN] = "1" 0102 // SAR 5456728, Add FC VUMD-Disp not equal to NULL to following if condi tion 0103 IfGC UMis not equal toFC VUMD-Disp Volum UomAndGC UMis not equal to<Blan k>AndFC VUMD-Disp Volum Uomis not equal to<Blank>AndFC VUMD-Disp Volum Uomis not equal to<Null> 0104 F41002 Get Item UoM Conversion BC Business Unit (F4211) -> BF szBranchPlant GC UM -> BF szFromUnitOfMeasure FC VUMD-Disp Volum Uom [HIDDEN] -> BF szToUnitOfMeasure FC ITVL-Unit Volume (wf) [HIDDEN] -> BF mnQuantityToConvert FC IVI-Inventory Interface [HIDDEN] -> BF cInventoryInterfaceFlag FC CONV-Fact. Fr-to-To [HIDDEN] <- BF mnConversionFactorFrom_to_To BC Committed (H/S) (F4211) -> BF cPotencyMode FC EKEY-Gen. Error Msg [HIDDEN] <- BF szErrorMessageID "1" -> BF cSuppressErrorMsg BC Item Number - Short (F4211) -> BF mnShortItemNumber VA frm_StdUOMConv_TFLA -> BF szStandardUOMConversion 0105 End If 0106 If FC EKEY-Gen. Error Msg is equal to <Blank> And FC CONV-Fact. Fr-to-T o is not equal to <Zero> 0107 FC ITVL-Total Volume [HIDDEN] = FC ITVL-Total Volume [HIDDEN]+(FC ITV L-Unit Volume (wf) [HIDDEN]*FC CONV-Fact. Fr-to-To [HIDDEN]) 0108 End If 0109 // SAR 8430056 - If there is an error while converting GC UM to Weight U OM or 0110 // C UM to Volume UOM, the Order Total calculation will not include all the 0111 // ines. Only the First Line's extended Price was displayed as Order Tot al 0112 // So display the error message if there is no Item/Standard UOM convers ion on 0113 // Weight/Volume UOM. 0114 If FC EKEY-Gen. Error Msg is not equal to <Blank> 0115 Set Control Error(FC EKEY-Gen. Error Msg, "0269") 0116 End If

0117 // SAR#8430056 - End 0118 End If 0119 // 0120 // SAR 5282019 0121 // 0122 If PO cWeb_Enable is equal to "1" 0123 IfGB Taxis not equal to<Null>AndGB Taxis not equal to<Blank>AndGB Taxis not equal to"N" 0124 GC Taxable[HIDDEN] = TV Yes [HIDDEN] 0125 Else 0126 GC Taxable[HIDDEN] = " " 0127 End If 0128 GC Description[HIDDEN] = GC Description 0129 GC InvoiceNumber [HIDDEN] = GC InvoiceNo. 0130 GC OrderNumber [HIDDEN] = GC OrderNo. 0131 GC InvoiceDate [HIDDEN] = GC InvoiceDate 0132 End If 0133 // 0134 // ======================================================= 0135 // SAR 8150388 - Kit Component Processing: Reset extended amounts to 0136 // calculated, hypothetical values for display purposes only. Users will s ee 0137 // the kit component's extended price--independent of the kit or kit parent 's 0138 // price. This "swap" is the second of two swaps--the first occurred in Gr id 0139 // Record is Fetched. 0140 // ======================================================= 0141 // 0142 If VA frm_iProcessKitInvcCmpnt_INT01 is equal to "1" 0143 Kit Invcng Get Component Ext Prices BC Item Number - Short (F4211) -> BF mnIdentifierShortItem_ITM BC Business Unit (F4211) -> BF szBranchPlant_MCU BC Amount - Price per Unit (F4211) -> BF mnUnitPriceAmount_UPRC BC Amount - Foreign Price per Unit (F4211) -> BF mnForeignUnitPriceAm ount_FUP BC Unit of Measure as Input (F4211) -> BF szUnitOfMeasureAsInput_UOM BC Unit of Measure - Secondary (F4211) -> BF szUnitOfMeasureSecondary _UOM2 BC Unit of Measure - Pricing (F4211) -> BF szUnitOfMeasurePricing_UOM 4 BC Quantity Shipped (F4211) -> BF mnUnitsQuantityShipped_SOQS BC Units - Qty Backordered/Held (F4211) -> BF mnUnitsQtyBOOrHeld_SOBK BC Dual Unit Of Measure Item (F4211) -> BF cDualUnitOfMeasureItem_DU AL BC Units - Secondary Quantity Ordered (F4211) -> BF mnUnitsSecondaryQ tyOr_SQOR FC IVI-Inventory Interface [HIDDEN] -> BF cInventoryInterface_IVI VA frm_mnCmpntAmtExtPrice_AEXP <- BF mnAmountExtendedPrice_AEXP VA frm_mnCmpntForAmtExtPrice_FEA <- BF mnForeignAmtExtendedPrice_FEA BC Currency Code - From (F4211) -> BF szCurrencyCodeFrom_CRCD BC Order Company (Order Number) (F4211) -> BF szOrderCompany_KCOO 0144 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0145 // the event Grid Record is Fetched. 0146 GC ExtendedPrice = VA frm_mnCmpntAmtExtPrice_AEXP 0147 Else 0148 GC ExtendedPrice = VA frm_mnCmpntForAmtExtPrice_FEA 0149 End If 0150 End If 0151 //

0152 // ======================================================= 0153 // SAR 8150388 - Kit Parent Processing: Use F4211 values for extended amou nt 0154 // display purposes. This "swap" is the second of two swaps--the first swa p 0155 // occurred in Grid Record is Fetched. 0156 // ======================================================= 0157 // 0158 If VA frm_iProcessKitInvParent_INT01 is equal to "1" 0159 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0160 // 8754034 - replace the variables with the parent variables, preassi gned in 0161 ! GC ExtendedPrice = VA frm_mnAmountExtendedPrice_AEXP 0162 GC ExtendedPrice = VA frm_mnParentAmtExtPrice_AEXP 0163 Else 0164 ! GC ExtendedPrice = VA frm_mnAmtForeignExtPrice_FEA 0165 GC ExtendedPrice = VA frm_mnParentForAmtExtPrice_FEA 0166 // end SAR 8754034 0167 End If 0168 End If 0169 // 0170 // ======================================================= 0171 // SAR 8150388: The following code is existing code that we have moved to the 0172 // end of this event. We can now properly set the font of the Extended 0173 // Price--we have reset it for kit component invoicing. 0174 // ======================================================= 0175 // 0176 If GC ExtendedPrice is less than <Zero> 0177 Set Grid Font(FC Grid, <Currently Selected Row>, GC ExtendedPrice, <,Reg ular,9,Red>) 0178 End If ----------------------------------------------------------------------EVENT: Last Grid Record Has Been Read ----------------------------------------------------------------------0001 // ======================================================= 0002 // SAR 8150388: Write any kit parent information lines that are required fo r 0003 // the last processed row. 0004 // ======================================================= 0005 // 0006 If VA frm_iWriteKitParentRows_INT01 is equal to "1" 0007 VA frm_iWriteKitParentRows_INT01 = "2" 0008 Press Button(FC Write Kit Parent Rows) 0009 End If 0010 // 0011 // SAR 5282019 0012 // 0013 If PO cWeb_Enable is equal to "1" 0014 Hide Control(FC Discount Tax Summary Message) 0015 Show Control(FC Tax Summary) 0016 Enable Control(FC Tax Summary) 0017 Show Control(FC Discount Summary) 0018 Enable Control(FC Discount Summary) 0019 End If 0020 // 0021 // ======================================================= 0022 // Enable Hyper Control options to Form & Row exits if the number of 0023 // records displayed is greater than 0. Also, see if Media Objects exist a

t for 0024 // level. If so, display "Attachments". 0025 // ======================================================= 0026 // 0027 If FC MATH06-Rec. Count is greater than "0" 0028 Enable Control(HC Discount Summary) 0029 Enable Control(HC Tax Summary) 0030 Enable Control(HC Order Address) 0031 Enable Control(HC &Order) 0032 Enable Control(HC &Invoice) 0033 Enable Control(HC Order Dat&es) 0034 Enable Control(HC Order &Detail) 0035 Enable Control(HC A&ttachments) 0036 Enable Control(HC &Pricing History) 0037 FC EV02-Form Attachment [HIDDEN] = " " 0038 Media Objects(GT4201A , <Exist>, FC EV02-Form Attachment, BC Document (Order No, Invoice, etc.), BC Order Type, BC Order Company (Order Number), ) 0039 If FC EV02-Form Attachment is equal to "1" 0040 Show Control(FC Attachments) 0041 Else 0042 VA frm_szPayItem_SFX = "000" 0043 Media Objects(GT03B11 , <Exist>, FC EV02-Form Attachment, BC Docum ent Company, BC Document (Voucher, Invoice, etc.), BC Document Type, VA frm_szPa yItem_SFX) 0044 If FC EV02-Form Attachment is equal to "1" 0045 Show Control(FC Attachments) 0046 Else 0047 Hide Control(FC Attachments) 0048 End If 0049 End If 0050 End If 0051 // ======================================================= 0052 // Localization begin 0053 // ======================================================= 0054 If SL CountryCode is not equal to <Blank> 0055 // SAR 7278881 - begin modified P&P NER function parameters 0056 P42230 Plug & Play NER BC Company (F4211) -> BF szCompany "P42230" -> BF szProgramId "CSD" -> BF szFormAction VA frm_mnSaveOrderNumber_DOCO -> BF mnDocumentOrderInvoiceE VA frm_szSaveOrderType_DCTO -> BF szOrderType VA frm_szSaveOrderCompany_KCOO -> BF szCompanyKeyOrderNo FC Document Company -> BF szCompanyKey FC Document Type -> BF szDocumentType FC Document Number -> BF mnDocVoucherInvoiceE FC Address Number -> BF mnAddressNumber FC Ship To X BF mnAddressNumberShipTo BC Tax Rate/Area (F4211) -> BF szTaxArea1 BC Business Unit (F4211) -> BF szCostCenter BC Date - Requested (F4211) -> BF jdTransactionDate FC CRR-Header Curr Rate [HIDDEN] -> BF mnCurrencyConverRateOv FC MATH05-Order Total [HIDDEN] -> BF mnAmountGross FC STAM-Total Tax Amt. [HIDDEN] -> BF mnAmtTax2 VA frm_szComputerID <> BF szComputerID VA frm_mnJobnumber <> BF mnJobnumberA FC TRAT-Store Tax Rate [HIDDEN] <> BF mnTaxRate1 FC STAM-Total Tax Amt. [HIDDEN] <> BF mnFCSTAMARG FC EV07-Chg in Tax SW [HIDDEN] <> BF cE07ChgARG FC Foreign -> BF cCurrencyMode

FC GENLN2-Grp Array Ptr. [HIDDEN] <> BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] <> BF idPtrToAreaAndAuthority VA frm_mnVertexJobNumber_JOBS -> BF mnVertexJobNumber 0057 // SAR 7278881 - end 0058 End If 0059 // 0060 // 0061 // SAR 5282019 0062 // 0063 GB Taxable[HIDDEN] = " " 0064 // 0065 // Localization Argentina end 0066 // ======================================================= 0067 // Insert blank line. 0068 // 0069 Clear Grid Buffer(FC Grid) 0070 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes> , <Yes>) 0071 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0072 // 0073 // Write Grid Line Totals. Order Total (highlighted), Total Weight and 0074 // Total Volume. 0075 // 0076 GB Description = TV Order Total. . . [HIDDEN] 0077 // 0078 // SAR 5282019 0079 // 0080 GB Description[HIDDEN] = TV Order Total. . . [HIDDEN] 0081 // 0082 GB ExtendedPrice = FC MATH05-Order Total [HIDDEN] 0083 GB Ext.Weight = FC WTLB-Total Weight [HIDDEN] 0084 GB Ext.Volume = FC ITVL-Total Volume [HIDDEN] 0085 GB UM = FC VUMD-Disp Volum Uom [HIDDEN] 0086 GB UM = FC WUMD-Disp Wght Uom [HIDDEN] 0087 // 0088 If SL CurrencyProcessing is not equal to "N" 0089 If FC Foreign is equal to "D" 0090 BC Currency Code - From (F4211) = VA frm_szBaseCurrency_CRDC 0091 Else 0092 BC Currency Code - From (F4211) = VA frm_szTransactionCurrency_CRCD 0093 End If 0094 Decimal Trigger Get By Currency BC Currency Code - From (F4211) -> BF szCurrencyCode GB ExtendedPrice2 [HIDDEN] <> BF mnDomOrFornAmount01 0095 End If 0096 // 0097 If GB ExtendedPrice is less than <Zero> 0098 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Red>) 0099 Else 0100 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Blue>) 0101 End If 0102 If GB Ext.Weight is less than <Zero> 0103 Set Grid Font(FC Grid, <Currently Selected Row>, GC Ext.Weight, <,Bold,9 ,Red>) 0104 Else 0105 Set Grid Font(FC Grid, <Currently Selected Row>, GC Ext.Weight, <,Bold,9 ,Blue>) 0106 End If 0107 If GB Ext.Volume is less than <Zero> 0108 Set Grid Font(FC Grid, <Current Row>, GC Ext.Volume, <,Bold,9,Red>)

0109 Else 0110 Set Grid Font(FC Grid, <Current Row>, GC Ext.Volume, <,Bold,9,Blue>) 0111 End If 0112 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0113 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0114 // 0115 // ======================================================= 0116 // Write Taxable Amount total line. 0117 // ======================================================= 0118 // 0119 GB Description = TV Taxable Amount [HIDDEN] 0120 // 0121 // SAR 5282019 0122 // 0123 GB Description[HIDDEN] = TV Taxable Amount [HIDDEN] 0124 // 0125 GB ExtendedPrice = FC ATXA-Tot.Taxable Amt [HIDDEN] 0126 If SL CurrencyProcessing is not equal to "N" 0127 Decimal Trigger Get By Currency BC Currency Code - From (F4211) -> BF szCurrencyCode GB ExtendedPrice2 [HIDDEN] <> BF mnDomOrFornAmount01 0128 End If 0129 If GB ExtendedPrice is less than <Zero> 0130 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Regular,10,Red >) 0131 End If 0132 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0133 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0134 // 0135 // ======================================================= 0136 // Write Tax Rate line ("N/A" if Tax details changed within the order). 0137 // ======================================================= 0138 // 0139 If FC EV07-Chg in Tax SW is equal to "1" 0140 GB Description = TV Tax Rate N/A [HIDDEN] 0141 Else 0142 GB Description = TV @ Tax Rate [HIDDEN] 0143 // 0144 // ** Begin SAR# 4217400 SK6005857 05/17/00 0145 // Mayer "Tax Rate N/A" fix begin 0146 FC TXR1-Tax Rate Display [HIDDEN] = FC TRAT-Store Tax Rate [HIDDEN]*100 0147 // Mayer "Tax Rate N/A" fix end 0148 // End SAR# 4217400 SK6005857 05/17/00 0149 // 0150 Math Numeric to String, Convert FC TXR1-Tax Rate Display [HIDDEN] -> BF mnMathNumeric01 VA frm_szGenericDesc_DL01 <- BF szVideoConstant30A 0151 GB Description = concat(GB Description,VA frm_szGenericDesc_DL01) 0152 GB Description = concat(GB Description," %") 0153 End If 0154 // 0155 // SAR 5282019 0156 // 0157 GB Description[HIDDEN] = GB Description 0158 // 0159 GB ExtendedPrice = FC STAM-Total Tax Amt. [HIDDEN] 0160 If SL CurrencyProcessing is not equal to "N" 0161 Decimal Trigger Get By Currency

BC Currency Code - From (F4211) -> BF szCurrencyCode GB ExtendedPrice2 [HIDDEN] <> BF mnDomOrFornAmount01 0162 End If 0163 If GB ExtendedPrice is less than <Zero> 0164 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Red>) 0165 Else 0166 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Blue>) 0167 End If 0168 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0169 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0170 // 0171 // ======================================================= 0172 // Write Freight Line Charge 0173 // ======================================================= 0174 // 0175 // SAR# 3154081 Begin 0176 // 0177 If PO cProcessFreightEstimate is equal to "1" And VA frm_cIsTransportSysAct ive_EV01 is equal to "1" 0178 // 0179 GB Description = TV Freight Charges [HIDDEN] 0180 // 0181 // SAR 5282019 0182 // 0183 GB Description[HIDDEN] = TV Freight Charges [HIDDEN] 0184 If FC Foreign is equal to "D" 0185 GB ExtendedPrice = VA frm_mnDomFreightChgAccum_FRCC 0186 Decimal Trigger Get By Currency VA frm_szBaseCurrency_CRDC -> BF szCurrencyCode GB ExtendedPrice <> BF mnDomOrFornAmount01 0187 Else 0188 GB ExtendedPrice = VA frm_mnForFreightChgAccum_FRCF 0189 Decimal Trigger Get By Currency VA frm_szTransactionCurrency_CRCD -> BF szCurrencyCode GB ExtendedPrice <> BF mnDomOrFornAmount01 0190 End If 0191 If GB ExtendedPrice is less than <Zero> 0192 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Red >) 0193 Else 0194 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Blu e>) 0195 End If 0196 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Ye s>, <Yes>) 0197 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0198 End If 0199 // ======================================================= 0200 // Write Invoice Total Line - Sum of Order Total and Tax Amount. 0201 // ======================================================= 0202 // 0203 GB Description = TV INVOICE TOTAL [HIDDEN] 0204 // 0205 // SAR 5282019 0206 // 0207 GB Description[HIDDEN] = TV INVOICE TOTAL [HIDDEN] 0208 // 0209 // SAR# 3154081 Begin 0210 // Add the freight charge to the Invoice Total.

0211 If FC Foreign is equal to "D" 0212 GB ExtendedPrice = (FC MATH05-Order Total [HIDDEN]+FC STAM-Total Tax Amt . [HIDDEN])+VA frm_mnDomesticFreightChrg_FRCC 0213 Else 0214 GB ExtendedPrice = (FC MATH05-Order Total [HIDDEN]+FC STAM-Total Tax Amt . [HIDDEN])+VA frm_mnForeignFreightChrg_FRCF 0215 End If 0216 // SAR# 3154081 End 0217 If SL CurrencyProcessing is not equal to "N" 0218 Decimal Trigger Get By Currency BC Currency Code - From (F4211) -> BF szCurrencyCode GB ExtendedPrice2 [HIDDEN] <> BF mnDomOrFornAmount01 0219 End If 0220 If GB ExtendedPrice is less than <Zero> 0221 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Red>) 0222 Else 0223 Set Grid Font(FC Grid, <Current Row>, GC ExtendedPrice, <,Bold,9,Blue>) 0224 End If 0225 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0226 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0227 // SAR# 5717289 Begin 0228 If PO cBypassProcessCommissions is not equal to "1" 0229 ! If PO cOrderLevelCommissions is equal to "1" 0230 ! // Accumulate Order level amounts by calling B4202140 in Mode '1' 0231 ! Calculate Commission Amounts ! VA frm_mnPreviousDOCO -> BF mnDocumentOrderInvoiceE ! VA frm_szPreviousDCTO -> BF szOrderType ! VA frm_szPreviousKCOO -> BF szCompanyKeyOrderNo ! "1" -> BF cModeProcessing ! VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumber ! VA frm_szComputerID_CTID -> BF szComputerID ! <Blank> -> BF cOrderLevelCommissions 0232 ! End If 0233 // Calculate commission amounts either at line level or order level by c alling 0234 // B4202140 in mode '2' 0235 Calculate Commission Amounts VA frm_mnPreviousDOCO -> BF mnDocumentOrderInvoiceE VA frm_szPreviousDCTO -> BF szOrderType VA frm_szPreviousKCOO -> BF szCompanyKeyOrderNo "2" -> BF cModeProcessing <Zero> -> BF cProofOrFinal VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumber VA frm_szComputerID_CTID -> BF szComputerID <Blank> -> BF cOrderLevelCommissions 0236 End If ----------------------------------------------------------------------EVENT: End Dialog ----------------------------------------------------------------------0001 If VA frm_idV4211AGHandle_GENID is greater than <Zero> 0002 V4211AG View Server VA frm_idV4211AGHandle_GENID <> BF idV4211AGHandle_GENID "7" -> BF cMode_EV01 0003 End If 0004 If VA frm_mnKitInvcngCacheJobNo_JOBS is greater than <Zero> 0005 Kit Invoicing Cache Terminate VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnJobNumber_JOBS 0006 End If

----------------------------------------------------------------------EVENT: Write Grid Line-After ----------------------------------------------------------------------evt_mUnitsInvoiceQuantity_IQTY evt_mnStockNumber_STOK evt_szUnitOfMeasure_BUM4 evt_mnAmbientVolume_AMBR evt_szUnitOfMeasure_BUM3 evt_mnWeightResult_WGTR evt_szUnitofMeasure_BUM5 evt_mnUnitPrice_Output_MATH01 evt_cF49211AmbientStandrd_PRAS evt_ExtendedPriceOutput_MATH04 evt_ErrCodeVerifyDualUOM_ERRC evt_ErrorIDVerifyDualUOM_DTAI evt_iWriteKitExtPriceAdj_INT01 0001 // ================================================ 0002 // SAR 8150388: Recognize the most recently written grid row. Eventually w e 0003 // use the grid row number to set the font for negative value. 0004 // ================================================ 0005 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0006 // 0007 // ================================================ 0008 // ADVANCED PRICE ADJUSTMENT DISPLAY 0009 // =============================================== 0010 VA frm_cContinueProcess_EV20 = "1" 0011 // 0012 // 0013 // 0014 // If Advanced Pricing is turned off or price schedule is blank, bypass 0015 // printing any adjustments. 0016 // 0017 // SAR 8648451 - Do not block blank adjustment schedule name because direct 0018 // price has no schedule name saved in F4211. 0019 // 0020 If VA frm_cAdvancedPricingYN_ADVP is equal to "N" 0021 VA frm_cContinueProcess_EV20 = "0" 0022 Else 0023 // 0024 // If price is overridden, bypass printing adjustments unless the or der is 0025 // created from a blanket order. 0026 // 0027 // SAR 6007393 Begin 0028 If BC Price Adj. History Indicator (F4211) is equal to <Blank> 0029 If BC Price Override Code (F4211) is equal to "1" 0030 If BC Original Order Type (F4211) is equal to <Blank> 0031 VA frm_cContinueProcess_EV20 = "0" 0032 Else 0033 Get UDC "OCTO" -> BF szDataDictionaryItem "40" -> BF szSystemCode "BT" -> BF szRecordTypeCode BC Original Order Type (F4211) -> BF szUserDefinedCode "3.00" -> BF mnKeyFieldLength "1" -> BF cSuppressErrorMessage 0034 If SV Error_Status is equal to CO ERROR 0035 VA frm_cContinueProcess_EV20 = "0"

0036 End If 0037 End If 0038 End If 0039 End If 0040 End If 0041 // SAR 6007393 End 0042 // 0043 If VA frm_cContinueProcess_EV20 is equal to "1" 0044 Clear Grid Buffer(FC Grid) 0045 // 0046 // The following function returns an error if there are no price his tory for 0047 // the sales detail line. Otherwise, it'll return the starting poin t for 0048 // printing the adjustments. 0049 // 0050 F4074 Get Last Override "1" -> BF cFile BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderNo BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szOrderCo BC Line Number (F4211) -> BF mnLineNoLNID VA frm_mnAdjSequenceNo_OSEQ <- BF mnSequenceNo VA frm_mnUnitAdjustment_LPRC <- BF mnUnitPrice VA frm_mnForeignUnitAdj_FPRC <- BF mnForeignUnitPrice 0051 // 0052 // =============================================================== 0053 // SAR 1971618: Remove "VA frm_mnUnitAdjustment_LPRC" from IF statement so 0054 // that IF statement reads "If SV Error _Status is not equal to CO ERROR ". 0055 // =============================================================== 0056 If SV Error_Status is not equal to CO ERROR 0057 // 0058 If VA frm_mnAdjSequenceNo_OSEQ is less than <Zero> 0059 VA frm_mnAdjSequenceNo_OSEQ = "0" 0060 Else 0061 VA frm_mnAdjSequenceNo_OSEQ = VA frm_mnAdjSequenceNo_OSEQ-1 0062 End If 0063 VA frm_cErrorCode_ERRC = "0" 0064 While VA frm_cErrorCode_ERRC is not equal to "1" 0065 F4074 Update Price History BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderNumb er BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szOrderCompany BC Line Number (F4211) -> BF mnLineNumber VA frm_mnAdjSequenceNo_OSEQ -> BF mnSequenceNumber VA frm_szAdjustmentName_AST <- BF szAdjName VA frm_mnUnitAdjustment_LPRC <- BF mnUnitPrice VA frm_mnForeignUnitAdj_FPRC <- BF mnForeignUnitPrice "6" -> BF cAdjControlCode "N" -> BF cActionCode VA frm_cErrorCode_ERRC <- BF cErrorCode "1" -> BF cSuppressErrorMsg "1" -> BF cFile VA frm_idF4074hRequest_GENLNG <> BF idHRequest 0066 If VA frm_cErrorCode_ERRC is not equal to "1" 0067 If SL CurrencyProcessing is equal to "N" Or FC For eign is equal to "D"

0068 If FC CONV-Fact. To-to-Prim is equal to <Zero> 0069 FC MATH03-To Uom Pric. [HIDDEN] = VA frm_mnUnitAdjustment _LPRC 0070 Else 0071 // 0072 // SAR 3416116 Begin. 0073 // Changed Multiplication to Division. 0074 FC MATH03-To Uom Pric. [HIDDEN] = VA frm_mnUnitAdjustment _LPRC/FC CONV-Fact. To-to-Prim [HIDDEN] 0075 // SAR 3416116 End. 0076 // 0077 End If 0078 Else 0079 If FC CONV-Fact. To-to-Prim is equal to <Zero> 0080 FC MATH03-To Uom Pric. [HIDDEN] = VA frm_mnForeignUnitAdj _FPRC 0081 Else 0082 // SAR 3416116 Begin. 0083 // Changed Multiplication to Division. 0084 FC MATH03-To Uom Pric. [HIDDEN] = VA frm_mnForeignUnitAdj _FPRC/FC CONV-Fact. To-to-Prim [HIDDEN] 0085 // SAR 3416116 End. 0086 // 0087 End If 0088 End If 0089 // SAR 5704437 Begin 0090 // For Bulk Item retrieve ambient and standard quantities from 0091 // F49211 and use 0092 // 0093 // ============================================================ = 0094 // SAR 7188288 Begin 0095 // For Bulk Item after confirming the shipment retrive Ambient Volume, weight 0096 // and Unit of Measure from F49211 and use this quantities for Adjustment 0097 // Price calculation 0098 // ============================================================ = 0099 // 0100 If VA frm_cBulkPackedFlag_BPFG is equal to "B" 0101 F49211.Fetch Single BC Document (Order No, Invoice, etc.) (F4211) = TK Docum ent (Order No, Invoice, etc.) BC Order Type (F4211) = TK Order Type BC Order Company (Order Number) (F4211) = TK Order Compa ny (Order Number) BC Line Number (F4211) = TK Line Number VA evt_cF49211AmbientStandrd_PRAS <- TK Price at Ambient/ Standard/Weight (A,S,W) VA evt_mnStockNumber_STOK <- TK Quantity - Primary Stock Accounting Unit VA evt_szUnitOfMeasure_BUM4 <- TK Unit of Measure VA evt_mnAmbientVolume_AMBR <- TK Volume - Ambient VA evt_szUnitOfMeasure_BUM3 <- TK Unit of Measure VA evt_mnWeightResult_WGTR <- TK Weight Result VA evt_szUnitofMeasure_BUM5 <- TK Unit of Measure 5 0102 End If 0103 // 0104 // Commented out the following two lines because IQTY cannot be

used for 0105 // Adjustment price calculation 0106 // 0107 ! If VA frm_cBulkPackedFlag_BPFG is equal to "B" 0108 ! F49211.Fetch Single ! BC Document (Order No, Invoice, etc.) (F4211) = TK Doc ument (Order No, Invoice, etc.) ! BC Order Type (F4211) = TK Order Type ! BC Business Unit (F4211) = TK Order Company (Order Num ber) ! BC Item Number - Short (F4211) = TK Line Number ! VA evt_mUnitsInvoiceQuantity_IQTY <- TK Units - Invoice Quantity 0109 ! FC MATH02-Qty Prim Uom [HIDDEN] = VA evt_mUnitsInvoiceQuan tity_IQTY 0110 ! End If 0111 If VA frm_cBulkPackedFlag_BPFG is equal to "B" And VA evt_mnAmb ientVolume_AMBR is not equal to <Zero> Or VA frm_cBulkPackedFlag_BPFG is equal t o "B" And VA evt_mnAmbientVolume_AMBR is not equal to <Null> Or VA frm_cBulkPack edFlag_BPFG is equal to "B" And VA evt_mnAmbientVolume_AMBR is not equal to <Bla nk> 0112 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0113 VA evt_mnUnitPrice_Output_MATH01 = VA frm_mnUnitAdjustmen t_LPRC 0114 Else 0115 VA evt_mnUnitPrice_Output_MATH01 = VA frm_mnForeignUnitAd j_FPRC 0116 End If 0117 Calculate Extended Price for Bulk Orders VA evt_cF49211AmbientStandrd_PRAS -> BF cPriceatAmbiantor Standard VA evt_mnStockNumber_STOK -> BF mnStockTotalVolume VA evt_szUnitOfMeasure_BUM4 -> BF szUnitofMeasure4 VA evt_mnAmbientVolume_AMBR -> BF mnAmbientResult VA evt_szUnitOfMeasure_BUM3 -> BF szUnitofMeasure3 VA evt_mnWeightResult_WGTR -> BF mnWeightResult VA evt_szUnitofMeasure_BUM5 -> BF szUnitofMeasure5 VA evt_mnUnitPrice_Output_MATH01 -> BF mnAmtPricePerUnit2 BC Unit of Measure - Pricing (F4211) -> BF szUnitOfMeasur ePricing VA evt_ExtendedPriceOutput_MATH04 <- BF mnAmountExtendedP rice 0118 FC MATH04-Net Amount [HIDDEN] = VA evt_ExtendedPriceOutput_M ATH04 0119 Else 0120 // Begin SAR # 8051195 Determine if the pricing uom is rela ted to secondary 0121 // or related to primary. If related to secondary UOM, then it needs to 0122 // calculate in reference with secondary quantity 0123 If BC Dual Unit Of Measure (F4211) Item is not equal to <Bl ank> And BC Dual Unit Of Measure (F4211) Item is not equal to <Null> 0124 Verify Dual Unit of Measure "1" -> BF cRelatedToSecondaryUoM BC Unit of Measure - Pricing (F4211) -> BF szUnitOfMea sureAsInput BC Unit of Measure - Secondary (F4211) -> BF szUnitOfM easureSecondary "1" -> BF cSuppressErrorMessage

VA evt_ErrorIDVerifyDualUOM_DTAI <- BF szErrorMessageI D VA evt_ErrCodeVerifyDualUOM_ERRC <- BF cErrorCode 0125 If VA evt_ErrorIDVerifyDualUOM_DTAI is equal to <Blank> O r VA evt_ErrorIDVerifyDualUOM_DTAI is equal to <Null> 0126 If BC Unit of Measure - (F4211) Pricing is not equal t o BC Unit of Measure - (F4211) Secondary 0127 F41002 Get Item UoM Conversion BC Business Unit (F4211) -> BF szBranchPlant BC Unit of Measure - Secondary (F4211) -> BF szF romUnitOfMeasure BC Unit of Measure - Pricing (F4211) -> BF szToU nitOfMeasure BC Units - Secondary Quantity Ordered (F4211) -> BF mnQuantityToConvert BC Item Number - Short (F4211) -> BF mnShortItem Number BC Units - Secondary Quantity Ordered (F4211) <BF mnQuantityConvertedFromtoTo 0128 FC MATH04-Net Amount [HIDDEN] = VA frm_mnUnitAdjust ment_LPRC*BC Units - Secondary Quantity Ordered (F4211) 0129 Else 0130 FC MATH04-Net Amount [HIDDEN] = VA frm_mnUnitAdjust ment_LPRC*BC Units - Secondary Quantity Ordered (F4211) 0131 End If 0132 Else 0133 FC MATH04-Net Amount [HIDDEN] = FC MATH03-To Uom Pric. [HIDDEN]*FC MATH02-Qty Prim Uom [HIDDEN] 0134 End If 0135 Else 0136 // End of SAR # 8051195 0137 FC MATH04-Net Amount [HIDDEN] = FC MATH03-To Uom Pric. [H IDDEN]*FC MATH02-Qty Prim Uom [HIDDEN] 0138 End If 0139 End If 0140 // End SAR # 5704437 0141 // 0142 // Commented out the following line because it is added at the else part of 0143 // the above if condition 0144 // 0145 ! FC MATH04-Net Amount [HIDDEN] = FC MATH03-To Uom Pric. [HIDDE N]*FC MATH02-Qty Prim Uom [HIDDEN] 0146 // 0147 // SAR 7188288 Ends 0148 // 0149 FC MATH04-Disc Net Amt [HIDDEN] = FC MATH04-Net Amount [HIDDEN] 0150 // 0151 // Load grid buffer columns then insert adjustment to grid. 0152 // 0153 F4071 Get Price Adjustment Type Row VA frm_szAdjustmentName_AST -> BF szPriceAdjustmentName VA frm_cTaxableYN_TXB <- BF cTaxable VA frm_cExcludeFromDiscount_PA03 <- BF cPriceAdjustmentCode0 3 "1" -> BF cSuppressErrorMessage 0154 VA frm_szPaymentTerms_PTC = BC Payment Terms Code (F4211) 0155 VA frm_szTaxExplanation_EXR1 = BC Tax Expl Code 1 (F4211) 0156 VA frm_szTaxArea_TXA1 = BC Tax Rate/Area (F4211) 0157 Press Button(FC Detached Adj Tax)

0158

F0005 Get Update UDC Description By Key "R" -> BF cMode GB Description <- BF szDescription "40" -> BF szSystemCode "TY" -> BF szUserDefinedCodes "8" -> BF mnCodeLength "1" -> BF cSuppressErrorMessage VA frm_szAdjustmentName_AST -> BF szUDCCode 0159 GB ExtendedPrice = FC MATH04-Net Amount [HIDDEN] 0160 GB Tax = VA frm_cTaxableYN_TXB 0161 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0162 FC MATH05-Order Total [HIDDEN] = FC MATH05-Order Total [HIDDEN] +FC MATH04-Net Amount [HIDDEN] 0163 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01 +1 0164 End If 0165 End While 0166 End If 0167 End If 0168 // SAR 7278881 begin - for Colombia 0169 // ================================================ 0170 // Localization Colombia 0171 // =============================================== 0172 If SL CountryCode is not equal to <Blank> 0173 P42230 Plug & Play NER BC Order Company (Order Number) (F4211) -> BF szCompany "P42230" -> BF szProgramId "CH1" -> BF szFormAction BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDocumentOrderIn voiceE BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szCompanyKeyOrderNo BC Line Number (F4211) -> BF mnLineNumber BC Document Company (F4211) -> BF szCompanyKey BC Document Type (F4211) -> BF szDocumentType BC Document (Voucher, Invoice, etc.) (F4211) -> BF mnDocVoucherInvoic eE VA frm_szComputerID <> BF szComputerID FC Foreign -> BF cCurrencyMode FC GENLN3-Area Arr. Ptr. [HIDDEN] -> BF idPtrToAreaAndAuthority VA frm_mnVertexJobNumber_JOBS -> BF mnVertexJobNumber 0174 End If 0175 // SAR 7278881 - end 0176 // 0177 // ================================================ 0178 // SAR 8150388 - Kit Component Processing: We attempt to mirror R42565 and 0179 // print informational lines only when the kit component's invoiced amt. is 0180 // different than its extended amt. 0181 // ================================================ 0182 // 0183 If VA frm_iProcessKitInvcCmpnt_INT01 is equal to "1" 0184 VA evt_iWriteKitExtPriceAdj_INT01 = "0" 0185 // 0186 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0187 // Remove nulls and blanks from the realm of comparison possibilities . 0188 If BC Accumulated Amount Invoiced (Domestic) (F4211) is equal to <Nul l> Or BC Accumulated Amount Invoiced (Domestic) (F4211) is equal to <Blank> 0189 BC Accumulated Amount Invoiced (Domestic) (F4211) = "0"

0190 End If 0191 If VA frm_mnCmpntAmtExtPrice_AEXP is equal to <Null> Or VA frm_mnCmpn tAmtExtPrice_AEXP is equal to <Blank> 0192 VA frm_mnCmpntAmtExtPrice_AEXP = "0" 0193 End If 0194 If BC Accumulated Amount Invoiced (Domestic) (F4211) is not equal to VA frm_mnCmpntAmtExtPrice_AEXP 0195 Clear Grid Buffer(FC Grid) 0196 VA evt_iWriteKitExtPriceAdj_INT01 = "1" 0197 GB ExtendedPrice = (VA frm_mnCmpntAmtExtPrice_AEXP-BC Accumulated Amount Invoiced (Domestic) (F4211))*-1 0198 Copy Currency Information(GB ExtendedPrice, BC Accumulated Amount Invoiced (Domestic) (F4211)) 0199 End If 0200 Else 0201 // Remove nulls and blanks from the realm of comparison possibilities . 0202 If BC Accumulated Amount Invoiced (Foreign) (F4211) is equal to <Null > Or BC Accumulated Amount Invoiced (Foreign) (F4211) is equal to <Blank> 0203 BC Accumulated Amount Invoiced (Foreign) (F4211) = "0" 0204 End If 0205 If VA frm_mnCmpntForAmtExtPrice_FEA is equal to <Null> Or VA frm_mnCm pntForAmtExtPrice_FEA is equal to <Blank> 0206 VA frm_mnCmpntForAmtExtPrice_FEA = "0" 0207 End If 0208 If BC Accumulated Amount Invoiced (Foreign) (F4211) is not equal to V A frm_mnCmpntForAmtExtPrice_FEA 0209 Clear Grid Buffer(FC Grid) 0210 VA evt_iWriteKitExtPriceAdj_INT01 = "1" 0211 GB ExtendedPrice = (VA frm_mnCmpntForAmtExtPrice_FEA-BC Accumulate d Amount Invoiced (Foreign) (F4211))*-1 0212 Copy Currency Information(GB ExtendedPrice, BC Accumulated Amount Invoiced (Foreign) (F4211)) 0213 End If 0214 End If 0215 // 0216 // Print up to three informational messages to provide insight into why the 0217 // component's extended amount is not the same as what we invoiced. To reduce 0218 // redundancy, only print parent detail if we have not printed it previo usly 0219 // for the parent or another component. Print an optional fourth messag e to 0220 // indicate that the parent informational messages may be out of context due 0221 // to a split parent. 0222 If VA evt_iWriteKitExtPriceAdj_INT01 is equal to "1" 0223 GB Description = TV Kit Extended Price Adjustment [HIDDEN] 0224 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <No>) 0225 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0226 If GB ExtendedPrice is less than <Zero> 0227 Set Grid Font(FC Grid, VA frm_iCurrentGridRowNo_INT01, GC Extended Price, <,Regular,9,Red>) 0228 End If 0229 // 0230 VA frm_iWriteKitParentRows_INT01 = "1" 0231 // 0232 // This set of "last" variables relates to data sequencing. To mirro

r R42565, 0233 // we want to print the parent informational lines whenever the kit s equencing 0234 // breaks. 0235 VA frm_mnKitCmpntLastOrdNo_DOCO = BC Document (Order No, Invoice, etc .) (F4211) 0236 VA frm_szKitCmpntLastOrdType_DCTO = BC Order Type (F4211) 0237 VA frm_szKitCmpntLastOrdCo_KCOO = BC Order Company (Order Number) (F4 211) 0238 VA frm_mnKitCmpntLastKitID_KITID = BC Kit Identifier (F4211) 0239 End If 0240 // 0241 // Save a fetch by retrieving a parent only if we're looking at a differ ent 0242 // parent. 0243 If BC Kit Master Line Number (F4211) is not equal to VA frm_mnKitParentL astLineNo_KTLN Or BC Document (Order No, Invoice, etc.) (F4211) is not equal to VA frm_mnKitParentLastOrdNo_DOCO Or BC Order Type (F4211) is not equal to VA frm _szKitParentLastOrdTyp_DCTO Or BC Order Company (Order Number) (F4211) is not eq ual to VA frm_szKitParentLastOrdCo_KCOO 0244 VA frm_cKitParentDisplayed_EV01 = "0" 0245 VA frm_mnAccInvcAmtDom_KITAMTDOM = "0" 0246 VA frm_mnAccInvcAmtFor_KITAMTFOR = "0" 0247 VA frm_mnCalcAccAmtDom_KITAMTDOM = "0" 0248 VA frm_mnCalcAccAmtFor_KITAMTFOR = "0" 0249 VA frm_mnKitParentInvcNo_DOC = "0" 0250 VA frm_szKitParentInvoiceType_DCT = "0" 0251 VA frm_szKitParentInvcCompany_KCO = "0" 0252 VA frm_mnParentAmtExtPrice_AEXP = "0" 0253 VA frm_mnParentForAmtExtPrice_FEA = "0" 0254 Kit Invoicing Get And Store Kit Parent BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderNumber_ DOCO BC Order Type (F4211) -> BF szOrderType_DCTO BC Order Company (Order Number) (F4211) -> BF szOrderCompany_KCOO BC Kit Master Line Number (F4211) -> BF mnLineNumber_LNID VA frm_idV4211AGHandle_GENID <> BF idV4211AGHandle_GENID VA frm_mnParentAmtExtPrice_AEXP <- BF mnAmountExtendedPrice_AEXP VA frm_mnParentForAmtExtPrice_FEA <- BF mnForeignAmtExtendedPrice_ FEA VA frm_mnKitParentInvcNo_DOC <- BF mnDocumentNumber_DOC VA frm_szKitParentInvoiceType_DCT <- BF szDocumentType_DCT VA frm_szKitParentInvcCompany_KCO <- BF szDocumentCompany_KCO VA frm_mnCalcAccAmtDom_KITAMTDOM <- BF mnCalcdDomAccAmt_KITAMTDOM VA frm_mnCalcAccAmtFor_KITAMTFOR <- BF mnCalcdForAccAmt_KITAMTFOR VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnKitInvoicingCacheJobNo_J OBS VA frm_mnAccInvcAmtDom_KITAMTDOM <- BF mnTblAccInvcAmtDom_KITAMTDO M VA frm_mnAccInvcAmtFor_KITAMTFOR <- BF mnTblAccInvcAmtFor_KITAMTFO R VA frm_cKitParentDisplayed_EV01 <- BF cKitParentProcessed_EV01 0255 If SV Error_Status is not equal to CO ERROR 0256 If BC Currency Code - From (F4211) is not equal to <Blank> And BC Currency Code - From (F4211) is not equal to <Null> 0257 Decimals Trigger Get by CO CRCD BC Order Company (Order Number) (F4211) <> BF szCompany BC Currency Code - From (F4211) <> BF szTransactionCurrencyC ode VA frm_mnAccInvcAmtDom_KITAMTDOM <> BF mnDomesticAmount01

VA VA VA VA VA

frm_mnCalcAccAmtDom_KITAMTDOM <> BF mnDomesticAmount02 frm_mnParentAmtExtPrice_AEXP <> BF mnDomesticAmount03 frm_mnAccInvcAmtFor_KITAMTFOR <> BF mnForeignAmount01 frm_mnCalcAccAmtFor_KITAMTFOR <> BF mnForeignAmount02 frm_mnParentForAmtExtPrice_FEA <> BF mnForeignAmount03

0258 End If 0259 VA frm_mnKitParentLastLineNo_KTLN = BC Kit Master Line Number (F42 11) 0260 VA frm_mnKitParentLastOrdNo_DOCO = BC Document (Order No, Invoice, etc.) (F4211) 0261 VA frm_szKitCmpntLastOrdType_DCTO = BC Order Type (F4211) 0262 VA frm_szKitCmpntLastOrdCo_KCOO = BC Order Company (Order Number) (F4211) 0263 End If 0264 End If 0265 // 0266 // The invoiced to date amount is based on the context of what we displa y in 0267 // the grid. (User filters, e.g., QBE, may limit what we display.) Cal culate 0268 // the invoiced to date value based on what the user can see. (Note tha t we 0269 // calculate the foreign and domestic values so that the cache is comple te.) 0270 VA frm_mnCalcAccAmtDom_KITAMTDOM = VA frm_mnCalcAccAmtDom_KITAMTDOM+BC A ccumulated Amount Invoiced (Domestic) (F4211) 0271 VA frm_mnCalcAccAmtFor_KITAMTFOR = VA frm_mnCalcAccAmtFor_KITAMTFOR+BC A ccumulated Amount Invoiced (Foreign) (F4211) 0272 // 0273 // Update the amount of the parent's displayed and invoiced components. 0274 Kit Invoicing Cache Update BC Document (Order No, Invoice, etc.) (F4211) -> BF mnOrderNumber_DOC O BC Order Type (F4211) -> BF szOrderType_DCTO BC Order Company (Order Number) (F4211) -> BF szOrderCompany_KCOO BC Kit Master Line Number (F4211) -> BF mnLineNumber_LNID VA frm_mnAccInvcAmtDom_KITAMTDOM -> BF mnDomesticAccAmtTbl_KITAMTDOM VA frm_mnAccInvcAmtFor_KITAMTFOR -> BF mnForeignAccAmtTbl_KITAMTFOR VA frm_mnCalcAccAmtDom_KITAMTDOM -> BF mnDomesticAccAmtNew_KITAMTDOM VA frm_mnCalcAccAmtFor_KITAMTFOR -> BF mnForeignAccAmtNew_KITAMTFOR VA frm_mnParentAmtExtPrice_AEXP -> BF mnAmountExtendedPrice_AEXP VA frm_mnParentForAmtExtPrice_FEA -> BF mnForeignAmtExtendedPrice_FEA VA frm_cKitParentDisplayed_EV01 -> BF cUpdateF4211Flag_EV01 "1" -> BF iIndexNumber_INT01 "4" -> BF iNumberOfKeys_INT02 VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnJobNumber_JOBS VA frm_mnKitParentInvcNo_DOC -> BF mnDocVoucherInvoice_DOC VA frm_szKitParentInvoiceType_DCT -> BF szDocumentType_DCT VA frm_szKitParentInvcCompany_KCO -> BF szDocumentCompany_KCO 0275 End If 0276 // 0277 If VA frm_iProcessKitInvParent_INT01 is equal to "1" 0278 Clear Grid Buffer(FC Grid) 0279 GB Description = TV Kit Invoiced To Date [HIDDEN] 0280 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0281 GB ExtendedPrice = BC Accumulated Amount Invoiced (Domestic) (F4211)* -1 0282 Copy Currency Information(GB ExtendedPrice, BC Accumulated Amount Inv oiced (Domestic) (F4211)) 0283 Else

0284 GB ExtendedPrice = BC Accumulated Amount Invoiced (Foreign) (F4211)*1 0285 Copy Currency Information(GB ExtendedPrice, BC Accumulated Amount Inv oiced (Foreign) (F4211)) 0286 End If 0287 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Ye s>, <No>) 0288 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0289 If GB ExtendedPrice is less than <Zero> 0290 Set Grid Font(FC Grid, VA frm_iCurrentGridRowNo_INT01, GC ExtendedPri ce, <,Regular,9,Red>) 0291 End If 0292 End If ----------------------------------------------------------------------EVENT: Variables ----------------------------------------------------------------------frm_StdUOMConv_TFLA frm_szPayItem_SFX frm_szTransactionCurrency_CRCD frm_szBaseCurrency_CRDC frm_cAdvancedPricingYN_ADVP frm_cContinueProcess_EV20 frm_mnAdjSequenceNo_OSEQ frm_mnUnitAdjustment_LPRC frm_mnForeignUnitAdj_FPRC frm_cErrorCode_ERRC frm_szAdjustmentName_AST frm_idF4074hRequest_GENLNG frm_cTaxableYN_TXB frm_szTaxArea_TXA1 frm_szTaxExplanation_EXR1 frm_szPaymentTerms_PTC frm_mnTaxItemGrp_MATH08 frm_szGenericDesc_DL01 frm_mnGenericNumeric_MATH01 frm_cExcludeFromDiscount_PA03 frm_szPrimaryItem_UITM frm_cIsvertexActive_VVTX frm_mnVertexJobNumber_JOBS frm_szAuthority1Desc_DL01 frm_szAuthority2Desc_DL01 frm_szAuthority3Desc_DL01 frm_szAuthority4Desc_DL01 frm_szAuthority5Desc_DL01 frm_Error frm_szTaxRateArea_TXA1 frm_cVertexAlreadyChecked_EV01 frm_cValidGeoCode_EV01 frm_SummaryLevelTaxCalculati frm_mnDomesticFreightChrg_FRCC frm_mnForeignFreightChrg_FRCF frm_cIsTransportSysActive_EV01 frm_mnTaxableAmount_MATH04 frm_mnPrevShortItemNumber_ITM frm_cBlankChar_EV01 frm_mnCustomerNumber_AN8 frm_szErrorMessage_DTAI frm_szCustomerDescription_DSC1 frm_szFormTitle_DS01

frm_mnSearchReturnDocument_DOC frm_mnSearchReturnOrder_DOCO frm_szComputerID_CTID frm_cFirstPass_EV01 frm_mnPreviousDOCO frm_szPreviousDCTO frm_szPreviousKCOO frm_szComputerID frm_mnJobnumber frm_mnDomFreightChgAccum_FRCC frm_mnForFreightChgAccum_FRCF frm_mnPrevDOCOForFreight_DOCO frm_szPrevDCTOForFreight_DCTO frm_szPrevKCOOForFreight_KCOO frm_cBulkPackedFlag_BPFG frm_jdInvoiceDateForTax_IVD frm_mnSaveOrderNumber_DOCO frm_szSaveOrderType_DCTO frm_szSaveOrderCompany_KCOO frm_PreviousAddressNumber_AN8 frm_ReportCodeAddBook001 frm_ReportCodeAddBook004 frm_cCurrencyConvMethod_CRCM frm_mnParentAmtExtPrice_AEXP frm_mnParentForAmtExtPrice_FEA frm_iProcessKitInvcCmpnt_INT01 frm_iProcessKitInvParent_INT01 frm_mnKitParentInvcNo_DOC frm_mnCmpntAmtExtPrice_AEXP frm_mnCmpntForAmtExtPrice_FEA frm_mnKitInvcngCacheJobNo_JOBS frm_mnKitParentLastLineNo_KTLN frm_idV4211AGHandle_GENID frm_szKitParentInvoiceType_DCT frm_szKitParentInvcCompany_KCO frm_mnCalcAccAmtDom_KITAMTDOM frm_mnAccInvcAmtDom_KITAMTDOM frm_mnCalcAccAmtFor_KITAMTFOR frm_mnAccInvcAmtFor_KITAMTFOR frm_cKitParentDisplayed_EV01 frm_mnKitCmpntLastOrdNo_DOCO frm_szKitCmpntLastOrdType_DCTO frm_szKitCmpntLastOrdCo_KCOO frm_iWriteKitParentRows_INT01 frm_mnKitCmpntLastKitID_KITID frm_mnTempExtendedAmt_AEXP frm_iCurrentGridRowNo_INT01 frm_mnKitParentLastOrdNo_DOCO frm_szKitParentLastOrdTyp_DCTO frm_szKitParentLastOrdCo_KCOO frm_mnAmountExtendedPrice_AEXP frm_mnAmtForeignExtPrice_FEA ======================================================================= CONTROL: HYPITEM F&ind EVENT: Button Clicked ----------------------------------------------------------------------0001 // ======================================================= 0002 // Check that both Order Number and Invoice Number are not blank. 0003 // At least one of them must be entered.

0004 // ======================================================= 0005 // 0006 If FC Document Number is less than or equal to "0" And FC Order Number is l ess than or equal to "0" 0007 Set Edit Control Error(FC Document Number, "4028") 0008 Set Edit Control Error(FC Order Number, "4028") 0009 Suppress Find 0010 Else 0011 // 0012 // ======================================================= 0013 // Disable Hyper Control options to Form & Row Exits. They will be enab led 0014 // once all data has been displayed in the grid (Rec. Count > 0). 0015 // ======================================================= 0016 // 0017 Disable Control(HC Discount Summary) 0018 Disable Control(HC Tax Summary) 0019 Disable Control(HC Order Address) 0020 Disable Control(HC Attachments, ) 0021 Disable Control(HC Or&der Dates, ) 0022 Disable Control(HC Order Detai&l, ) 0023 Disable Control(HC Atta&chments, ) 0024 FC MATH06-Rec. Count [HIDDEN] = "0" 0025 // 0026 // ======================================================= 0027 // Reset Totals to zero. 0028 // ======================================================= 0029 // 0030 FC MATH05-Order Total [HIDDEN] = "0" 0031 FC WTLB-Total Weight [HIDDEN] = "0" 0032 FC ITVL-Total Volume [HIDDEN] = "0" 0033 FC ATXA-Tot.Taxable Amt [HIDDEN] = "0" 0034 FC STAM-Total Tax Amt. [HIDDEN] = "0" 0035 // 0036 // ======================================================= 0037 // Set Change in Tax SW to OFF. 0038 // ======================================================= 0039 // 0040 FC EV07-Chg in Tax SW [HIDDEN] = "0" 0041 FC VC10A-Store Tax Area [HIDDEN] = " " 0042 FC VC01A-Store Taxable [HIDDEN] = " " 0043 FC TRAT-Store Tax Rate [HIDDEN] = "0" 0044 // 0045 // ======================================================= 0046 // Reset link-list only after record is fetched 0047 // 0048 If FC EV05-First Time SW is equal to "0" 0049 // 0050 // ======================================================= 0051 // Call Discount Store/Get routine in destroy mode to clear the previ ous 0052 // array from memory. Immediately following this, call again in 0053 // initialise mode to create a new array for this Find. 0054 // ======================================================= 0055 // 0056 F4211 Accumulate Payment Term Discount "4" <> BF cStoreGetOrInitialize <Zero> <> BF cSuppressErrorMsg FC GENLNG-Discount Ptr. [HIDDEN] -> BF idPtrToDiscountList 0057 F4211 Accumulate Payment Term Discount

"3" <> BF cStoreGetOrInitialize <Zero> <> BF cSuppressErrorMsg FC GENLNG-Discount Ptr. [HIDDEN] <- BF idPtrToDiscountList 0058 0059 0060 0061 array 0062 0063 0064 0065 // // ======================================================= // Repeat above for the Tax Summary Store/Get routine. This routine // stores two arrays; By Group & by Area/Authority Codes. The third // is removed from memory. We do not use it in this application. // ======================================================= // F4211 Accumulate Sales Tax Summary "4" <> BF cStoreGetOrInitialize "N" <> BF cStoreTaxAreaExplCode FC GENLN2-Grp Array Ptr. [HIDDEN] -> BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] -> BF idPtrToAreaAndAuthority <Zero> <> BF cSuppressErrorMsg F4211 Accumulate Sales Tax Summary "3" <> BF cStoreGetOrInitialize "N" <> BF cStoreTaxAreaExplCode FC GENLN2-Grp Array Ptr. [HIDDEN] <- BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] <- BF idPtrToAreaAndAuthority "1" -> BF idPtrToAreaExplanation <Zero> <> BF cSuppressErrorMsg End If // ======================================================= // Set First Time switch ON FC EV05-First Time SW [HIDDEN] = "1" End If // ======================================================= // Argentina localization begun // call Plug & Play N7000490 // ======================================================= If SL CountryCode is not equal to <Blank> P42230 Plug & Play NER BC Order Company (Order Number) (F4211) -> BF szCompany "ADD" -> BF szFormAction VA frm_szComputerID <> BF szComputerID VA frm_mnJobnumber <> BF mnJobnumberA End If // ======================================================= // End localization exit // Added code under SAR#3141319, 8/12/99 If VA frm_SummaryLevelTaxCalculati is equal to "Y" CacheToHoldRoundedAndUnroundedTaxes VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumberA "D" -> BF cActionCode End If // End SAR#3141319, 8/12/99 // // SAR 5282019 // For Web Transactions - Set form like reg form, then hide blank items // If PO cWeb_Enable is equal to "1" // // Mode 3 transactions // Set Control Text(FC st_Order_Number, FC Order Number) Set Control Text(FC st_Invoice_Number, FC Document Number) Hide Grid Column(FC Grid, GC OrderNo.)

0066

0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077

0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0092 0093 0094 0095 0096

0097 Hide Grid Column(FC Grid, GC OrderType) 0098 Hide Grid Column(FC Grid, GC InvoiceNo.) 0099 Hide Grid Column(FC Grid, GC InvoiceType) 0100 Hide Control(FC Tax Summary) 0101 Hide Control(FC Discount Summary) 0102 Show Control(FC Discount Tax Summary Message) 0103 If FC Document Number is equal to <Blank> Or FC Document Number is equa l to <Null> 0104 Hide Control(FC Sales Invoice Number) 0105 Hide Control(FC st_Invoice_Number) 0106 // SAR 6172479 - display the correct column 0107 ! Show Grid Column(FC Grid, GC InvoiceNo.) 0108 Show Grid Column(FC Grid, GC InvoiceNumber) 0109 Show Grid Column(FC Grid, GC InvoiceType) 0110 Else 0111 Show Control(FC Sales Invoice Number) 0112 Show Control(FC st_Invoice_Number) 0113 End If 0114 If FC Order Number is equal to <Blank> Or FC Order Number is equal to < Null> 0115 Hide Control(FC Sales Order Number) 0116 Hide Control(FC st_Order_Number) 0117 // SAR 6172479 - display the correct column 0118 ! Show Grid Column(FC Grid, GC OrderNo.) 0119 Show Grid Column(FC Grid, GC OrderNumber) 0120 Show Grid Column(FC Grid, GC OrderType) 0121 Else 0122 Show Control(FC Sales Order Number) 0123 Show Control(FC st_Order_Number) 0124 End If 0125 End If 0126 // 0127 // ======================================================= 0128 // SAR 8150388: Clear the Kit Invoicing cache to reflect a change in what the 0129 // grid displays. 0130 // ======================================================= 0131 // 0132 If VA frm_mnKitInvcngCacheJobNo_JOBS is greater than <Zero> 0133 Kit Invoicing Cache Clear VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnJobNumber_JOBS 0134 End If 0135 // 0136 // Reset the "global" kit invoicing variables. 0137 VA frm_cKitParentDisplayed_EV01 = "0" 0138 VA frm_mnAccInvcAmtDom_KITAMTDOM = "0" 0139 VA frm_mnAccInvcAmtFor_KITAMTFOR = "0" 0140 VA frm_mnCalcAccAmtDom_KITAMTDOM = "0" 0141 VA frm_mnCalcAccAmtFor_KITAMTFOR = "0" 0142 VA frm_mnKitParentInvcNo_DOC = "0" 0143 VA frm_szKitParentInvoiceType_DCT = "0" 0144 VA frm_szKitParentInvcCompany_KCO = "0" 0145 VA frm_mnParentAmtExtPrice_AEXP = "0" 0146 VA frm_mnParentForAmtExtPrice_FEA = "0" 0147 VA frm_mnKitParentLastLineNo_KTLN = "0" 0148 VA frm_iCurrentGridRowNo_INT01 = "0" ======================================================================= CONTROL: HYPITEM &Close EVENT: Button Clicked

----------------------------------------------------------------------0001 // 0002 // ======================================================= 0003 // Call Discount Store/Get routine in destroy mode. This clears the 0004 // array from memory. 0005 // ======================================================= 0006 // 0007 F4211 Accumulate Payment Term Discount "4" <> BF cStoreGetOrInitialize <Zero> <> BF cSuppressErrorMsg FC GENLNG-Discount Ptr. [HIDDEN] <> BF idPtrToDiscountList 0008 // 0009 // ======================================================= 0010 // Call Tax Store/Get routine in destroy mode to clear the two arrays 0011 // from memory. 0012 // ======================================================= 0013 F4211 Accumulate Sales Tax Summary "4" <> BF cStoreGetOrInitialize "N" <> BF cStoreTaxAreaExplCode FC GENLN2-Grp Array Ptr. [HIDDEN] -> BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] -> BF idPtrToAreaAndAuthority <Zero> <> BF cSuppressErrorMsg 0014 // 0015 // ======================================================= 0016 // Argentina localization begun 0017 // Call Plug & Play N7000490 0018 // ======================================================= 0019 If SL CountryCode is not equal to <Blank> 0020 P42230 Plug & Play NER BC Order Company (Order Number) (F4211) -> BF szCompany "DEL" -> BF szFormAction VA frm_szComputerID <> BF szComputerID VA frm_mnJobnumber <> BF mnJobnumberA 0021 End If 0022 // ======================================================= 0023 // End localization requirements 0024 // Vertex changes, 1469038, 12/21/98 0025 // SAR# 2800685 0026 // 0027 // Call Load and Retrieve Vertex Cache only when Vertex is active or el se an 0028 // error will occur. 0029 If VA frm_cIsvertexActive_VVTX is equal to "1" 0030 Load and Retrieve Vertex Cache "2" -> BF cCalledFromFlag VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumberA "3" -> BF cModeProcessing 0031 End If 0032 // Added code under SAR#3141319, 8/12/99 0033 If VA frm_SummaryLevelTaxCalculati is equal to "Y" 0034 CacheToHoldRoundedAndUnroundedTaxes VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumberA "D" -> BF cActionCode 0035 End If 0036 // End SAR#3141319, 8/12/99 0037 // SAR# 4648664 Begin 0038 If PO cBypassProcessCommissions is not equal to "1" 0039 Calculate Commission Amounts "3" -> BF cModeProcessing <Zero> -> BF cProofOrFinal

VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumber VA frm_szComputerID_CTID -> BF szComputerID 0040 End If ======================================================================= CONTROL: HYPITEM Added &Selection EVENT: Button Clicked ----------------------------------------------------------------------0001 Call( App:P42SEL , Form: W42SELE ) FC LTT2-Status From (wf) [HIDDEN] <> FI szStatusCodeLast2 FC NXT2-Status Thru (wf) [HIDDEN] <> FI szStatusCodeNext2 FC EV01-Based on Status [HIDDEN] <> FI cStatusRangeBasedOnOW FC EV02-Backorders Incl. [HIDDEN] <> FI cIncludeBackordersOW ======================================================================= CONTROL: HYPITEM Discou&nt Summary EVENT: Button Clicked ----------------------------------------------------------------------0001 Call( App:P42240 , Form: W42240A ) FC Order Number <> FI DocumentOrderInvoiceE FC GENLNG-Discount Ptr. [HIDDEN] <> FI Ptr to Discount Array FC Currency Code -> FI CurrencyCode PO cWeb_Enable -> FI cWebEnable ======================================================================= CONTROL: HYPITEM Ta&x Summary EVENT: Button Clicked ----------------------------------------------------------------------0001 // SAR# 3582974 Begin 0002 // Pass in the order transaction date into P42235. 0003 Call( App:P42235 , Form: W42235A ) BC Document (Order No, Invoice, etc.) (F4211) <> FI DocumentOrderInvoice E FC GENLN2-Grp Array Ptr. [HIDDEN] <> FI Ptr To Array 1 FC GENLN3-Area Arr. Ptr. [HIDDEN] <> FI Ptr To Array 2 FC EV07-Chg in Tax SW [HIDDEN] <> FI Change in Tax Flag FC Currency Code -> FI CurrencyCode VA frm_cIsvertexActive_VVTX -> FI cIsVertexActive VA frm_jdInvoiceDateForTax_IVD -> FI TransactionDate PO cWeb_Enable -> FI cWeb_Enable 0004 // SAR# 3582974 End 0005 // ======================================================================= CONTROL: HYPITEM Commission Accruals EVENT: Button Clicked ----------------------------------------------------------------------0001 // SAR# 4648664 Begin 0002 // Call P42170 'Calculate Commission Amounts' 0003 Call( App:P42170 , Form: W42170A ) VA frm_mnVertexJobNumber_JOBS -> FI mnJobnumber VA frm_szComputerID_CTID -> FI szComputerID 0004 // End Commission call ======================================================================= CONTROL: HYPITEM O&rder Address EVENT: Button Clicked ----------------------------------------------------------------------OPT: Repeat ER for Event 0001 Call( App:P4006 , Form: W4006B )

FC Address Number <> FI AddressNumber FC Ship To <> FI ShipToNumber VA frm_mnSaveOrderNumber_DOCO <> FI OrderNumber VA frm_szSaveOrderType_DCTO <> FI OrderType VA frm_szSaveOrderCompany_KCOO <> FI OrderCompany "S" <> FI CalledFromSales_S_OrPurch_P GC Trans.Date [HIDDEN] -> FI jdDateTransactionJulian ======================================================================= CONTROL: HYPITEM Regional Info EVENT: Button Clicked ----------------------------------------------------------------------0001 // ======================================================= 0002 // Localization Argentina begin 0003 // ======================================================= 0004 If SL CountryCode is not equal to <Blank> 0005 P42230 Plug & Play NER BC Order Company (Order Number) (F4211) -> BF szCompany "P76A230" -> BF szProgramId "XIT" -> BF szFormAction BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDocumentOrderIn voiceE BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szCompanyKeyOrderNo VA frm_szComputerID <> BF szComputerID VA frm_mnJobnumber <> BF mnJobnumberA FC Foreign -> BF cCurrencyMode 0006 End If ======================================================================= CONTROL: HYPITEM &Order Attachment EVENT: Button Clicked ----------------------------------------------------------------------0001 // 0002 // ======================================================= 0003 // Enter Generic Text at Order-level. 0004 // ======================================================= 0005 // 0006 FC EV02-Form Attachment [HIDDEN] = " " 0007 Media Objects(GT4201A , <Edit>, FC EV02-Form Attachment, BC Document (Ord er No, Invoice, etc.), BC Order Type, BC Document Company (Order Number), ) 0008 If FC EV02-Form Attachment is equal to "1" 0009 Show Control(FC Attachments, ) 0010 Else 0011 Hide Control(FC Attachments, ) 0012 End If ======================================================================= CONTROL: HYPITEM &Invoice Attachment EVENT: Button Clicked ----------------------------------------------------------------------0001 If FC Document Number is equal to <Zero> 0002 Set Edit Control Error(FC Document Number, "0003") 0003 Else 0004 FC EV02-Form Attachment [HIDDEN] = " " 0005 VA frm_szPayItem_SFX = "000" 0006 Media Objects(GT03B11 , <Edit>, FC EV02-Form Attachment, BC Document C ompany, BC Document (Voucher, Invoice, etc.), BC Document Type, VA frm_szPayItem _SFX) 0007 If FC EV02-Form Attachment is equal to "1"

0008 Show Control(FC Attachments) 0009 End If 0010 End If ======================================================================= CONTROL: HYPITEM Order Dat&es EVENT: Button Clicked ----------------------------------------------------------------------0001 If GC OrderNumber is not equal to "0" 0002 Call( App:P42045 , Form: W42045G ) GC OrderCo. -> FI CompanyKeyOrderNo GC OrderNo. -> FI DocumentOrderInvoiceE GC OrTy -> FI OrderType GC LineNumber [HIDDEN] -> FI LineNumber 0003 End If ======================================================================= CONTROL: HYPITEM Order &Detail EVENT: Button Clicked ----------------------------------------------------------------------0001 If GC OrderNumber is not equal to <Zero> 0002 Call( App:P42045 , Form: W42045A ) GC OrderCo. -> FI CompanyKeyOrderNo GC OrderNo. -> FI DocumentOrderInvoiceE GC OrTy -> FI OrderType GC LineNumber [HIDDEN] -> FI LineNumber FC Foreign -> FI cCurrencyMode 0003 End If ======================================================================= CONTROL: HYPITEM Detail A&ttachments EVENT: Button Clicked ----------------------------------------------------------------------0001 // 0002 // ======================================================= 0003 // Perform Generic Text function if the current grid is a data line (not a 0004 // custom total line. 0005 // ======================================================= 0006 // 0007 If GC OrderNumber is not equal to "0" 0008 Media Objects(GT4211A , <Edit>, FC EV01-Row Attachment, GC OrderNumber , GC OrTy, GC OrderCo., GC LineNumber, ) 0009 If FC EV01-Row Attachment is equal to "1" 0010 Set Grid Text Indicator(FC Grid, <Current Row>, <Yes>) 0011 Else 0012 Set Grid Text Indicator(FC Grid, <Current Row>, <No>) 0013 End If 0014 End If ======================================================================= CONTROL: HYPITEM Message List EVENT: Button Clicked ----------------------------------------------------------------------0001 Call( App:P40116 , Form: W40116C ) GC OrderNo. -> FI mnDocumentOrderInvoiceE GC OrTy -> FI szOrderType GC OrderCo. -> FI szCompanyKeyOrderNo GC AddressNumber [HIDDEN] -> FI mnAddressNumber GC ShipTo Number [HIDDEN] -> FI mnAddressNumberShipTo GC ShortItem No [HIDDEN] -> FI mnIdentifierShortItem

GC GC GC GC GC

Trans.Date [HIDDEN] -> FI jdDateEffectiveJulian1 Quantity -> FI mnUnitsTransactionQty UM -> FI szUnitOfMeasureAsInput PrintMessage [HIDDEN] -> FI szPrintMessage1 BusinessUnit [HIDDEN] -> FI szCostCenter

======================================================================= CONTROL: HYPITEM &Pricing History EVENT: Button Clicked ----------------------------------------------------------------------evt_szPaymentResponceCode_DL01 0001 If GC OrderNumber is not equal to <Zero> 0002 If VA frm_szPrimaryItem_UITM is equal to <Blank> Or VA frm_szPrimaryIte m_UITM is equal to <Null> Or GC ShortItem No is not equal to VA frm_mnPrevShort ItemNumber_ITM 0003 F4101 Select Primary Item Number GC ShortItem No [HIDDEN] -> BF mnShortItemNumber GC ndItem Number [HIDDEN] -> BF sz2ndItemNumber GC rdItem Number [HIDDEN] -> BF sz3rdItemNumber GC BusinessUnit [HIDDEN] -> BF szBranchPlant VA frm_szPrimaryItem_UITM <- BF szPrimaryItemNumber 0004 // SAR 3625751 0005 VA frm_mnPrevShortItemNumber_ITM = GC ShortItem No [HIDDEN] 0006 End If 0007 // SAR# 3029837 0008 // 0009 // Disabled the Advance Pricing if then statement because it should always 0010 // call the Price History W4074C form. 0011 // 0012 ! If VA frm_cAdvancedPricingYN_ADVP is equal to "Y" 0013 // SAR# 2800669 0014 // 0015 // Changed the parameter of Unitofmeasureasinput from GC UM to th e (3rd) GC 0016 // UM which is the GC UnitOfMeasureAsInput field. 0017 // 0018 ! Call( App:P4074 , Form: W4074C ) ! GC OrderNo. -> FI Documentorderinvoicee ! GC OrTy -> FI Ordertype ! GC OrderCo. -> FI Companykeyorderno ! GC LineNumber [HIDDEN] -> FI Linenumber ! VA frm_szPrimaryItem_UITM -> FI Itemnounknownformat ! GC Description -> FI Descriptionline1 ! GC QuantityOrdered [HIDDEN] -> FI Unitstransactionqty ! GC UM -> FI Unitofmeasureasinput ! GC PRUM [HIDDEN] -> FI Unitofmeasurepricing ! GC AddressNumber [HIDDEN] -> FI Addressnumber ! GC ShortItem No [HIDDEN] -> FI Identifiershortitem ! FC Foreign -> FI Currencymode ! GC UnitPrice [HIDDEN] -> FI Amtpriceperunit2 ! "N" -> FI PaymentResponsibiCode ! GC UnitCost [HIDDEN] -> FI Amountunitcost ! GC ForeignUnit Cost [HIDDEN] -> FI Amountforeignunitcost ! GC QuantityShipped [HIDDEN] -> FI Unitsquantityshipped ! GC BusinessUnit [HIDDEN] -> FI Costcenter ! GC CurCod [HIDDEN] -> FI Currencycodefrom ! VA frm_szBaseCurrency_CRDC -> FI Currencycodeto ! GC PriceEffective Date [HIDDEN] -> FI Datepriceeffectivedate ! GC Adj.Schedule [HIDDEN] -> FI Priceadjustmentschedulen

! ! 0019 nt to N 0020 0021 0022 0023

GC ShipTo Number [HIDDEN] -> FI Addressnumbershipto "A" -> FI CheckPriceOrAdjustments // Sar 7561396 - Utilize W4074D for performance reasons. Assign payme VA evt_szPaymentResponceCode_DL01 = "N" // SAR 7991302 Currency Code and Currency Rate pass to Price History // Application Call( App:P4074 , Form: W4074D ) VA frm_mnVertexJobNumber_JOBS -> FI mnJobNumber GC LineNumber [HIDDEN] -> FI mnLineNumber GC OrderNo. -> FI mnOrderNumber GC OrTy -> FI szOrderType GC OrderCo. -> FI szOrderCompany GC BusinessUnit [HIDDEN] -> FI szCostCenter GC AddressNumber [HIDDEN] -> FI mnAddressNumber GC ShipTo Number [HIDDEN] -> FI mnShipTo GC ShortItem No [HIDDEN] -> FI mnShortItemNo VA frm_szPrimaryItem_UITM -> FI szItemUnknownFormat GC QuantityOrdered [HIDDEN] -> FI mnQuantityOrdered GC QuantityShipped [HIDDEN] -> FI mnQuantityShipped GC UnitPrice [HIDDEN] -> FI mnUnitPrice GC UnitCost [HIDDEN] -> FI mnUnitCost GC ForeignUnit Cost [HIDDEN] -> FI mnForeignUnitCost GC Description -> FI szDescriptionLine GC UM -> FI szUnitOfMeasureAsInput GC PRUM [HIDDEN] -> FI szUnitOfMeasurePricing VA evt_szPaymentResponceCode_DL01 -> FI szPaymentResponsibiCode FC Foreign -> FI cCurrencyMode FC CRR-Header Curr Rate [HIDDEN] -> FI mnCurrencyConvRate FC Currency Code -> FI szCurrencyCodeFrom GC PriceEffective Date [HIDDEN] -> FI jdPriceEffectiveDate GC Adj.Schedule [HIDDEN] -> FI szPriceAdjSchedule "A" -> FI cCheckPriceOrAdjustments Else // SAR# 2800669 // // When calling Check pricing and availability with Advanced Pric

0024 ! 0025 0026 0027 ing off, 0028 // then it should call the W4074H form. 0029 // 0030 ! Call( App:P4074 , Form: W4074A ) ! GC OrderNo. -> FI DocumentOrderInvoiceE ! GC OrTy -> FI OrderType ! GC OrderCo. -> FI CompanyKeyOrderNo ! GC LineNumber [HIDDEN] -> FI LineNumber ! <Zero> -> FI SequenceNumber 0031 // SAR# 3029837 0032 // 0033 // Disabled call to the Price History W4074H form. 0034 // 0035 ! Call( App:P4074 , Form: W4074H ) ! GC OrderNo. -> FI DocumentOrderInvoiceE ! GC OrTy -> FI OrderType ! GC OrderCo. -> FI CompanyKeyOrderNo ! GC LineNumber [HIDDEN] -> FI LineNumber ! GC ShortItem No [HIDDEN] -> FI Identifiershortitem ! GC UM -> FI Unitofmeasurepricing ! GC BusinessUnit [HIDDEN] -> FI Costcenter 0036 ! End If 0037 End If

======================================================================= CONTROL: GRIDCOL Invoice No. EVENT: Grid Column Clicked ----------------------------------------------------------------------OPT: Disabled Event 0001 // SAR 6172479 - Diasbled the whole ER Event since this logic should be in the 0002 // Invoice Number Column instead of Invoice No. 0003 // 0004 FC Document Number = GC InvoiceNo. 0005 FI Docvoucherinvoicee = FC Document Number 0006 Set Control Text(FC st_Invoice_Number, FC Document Number) 0007 Hide Grid Column(FC Grid, GC InvoiceNo.) 0008 Hide Grid Column(FC Grid, GC InvoiceType) 0009 Hide Grid Column(FC Grid, GC OrderNo.) 0010 Hide Grid Column(FC Grid, GC OrderType) 0011 // 0012 Hide Control(FC Tax Summary) 0013 Hide Control(FC Discount Summary) 0014 Show Control(FC Discount Tax Summary Message) 0015 // 0016 IfGC InvoiceNo.is not equal to<Blank>AndGC InvoiceNo.is not equal to<Null> 0017 Show Control(FC Sales Invoice Number) 0018 Show Control(FC st_Invoice_Number) 0019 Else 0020 Hide Control(FC Sales Invoice Number) 0021 Hide Control(FC st_Invoice_Number) 0022 Show Grid Column(FC Grid, GC InvoiceNo.) 0023 Show Grid Column(FC Grid, GC InvoiceType) 0024 End If 0025 IfFC Order Numberis not equal to<Blank>OrFC Order Numberis not equal to<Nul l> 0026 Show Control(FC Sales Order Number) 0027 Show Control(FC st_Order_Number) 0028 Else 0029 Hide Control(FC Sales Order Number) 0030 Hide Control(FC st_Order_Number) 0031 Show Grid Column(FC Grid, GC OrderNo.) 0032 Show Grid Column(FC Grid, GC OrderType) 0033 End If 0034 Set Control Text(FC st_Invoice_Number, FC Document Number) 0035 Set Control Text(FC st_Order_Number, FC Order Number) 0036 Press Button(HC F&ind) ======================================================================= CONTROL: GRIDCOL Invoice Number [HIDDEN] EVENT: Grid Column Clicked ----------------------------------------------------------------------0001 // SAR 6172479 - Created this ER Event 0002 // 0003 FC Document Number = GC InvoiceNo. 0004 FI Docvoucherinvoicee = FC Document Number 0005 Set Control Text(FC st_Invoice_Number, FC Document Number) 0006 Hide Grid Column(FC Grid, GC InvoiceNo.) 0007 Hide Grid Column(FC Grid, GC InvoiceType) 0008 Hide Grid Column(FC Grid, GC OrderNo.) 0009 Hide Grid Column(FC Grid, GC OrderType) 0010 // 0011 Hide Control(FC Tax Summary)

0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 l> 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035

Hide Control(FC Discount Summary) Show Control(FC Discount Tax Summary Message) // IfGC InvoiceNo.is not equal to<Blank>AndGC InvoiceNo.is not equal to<Null> Show Control(FC Sales Invoice Number) Show Control(FC st_Invoice_Number) Else Hide Control(FC Sales Invoice Number) Hide Control(FC st_Invoice_Number) Show Grid Column(FC Grid, GC InvoiceNo.) Show Grid Column(FC Grid, GC InvoiceType) End If IfFC Order Numberis not equal to<Blank>OrFC Order Numberis not equal to<Nul Show Control(FC Sales Order Number) Show Control(FC st_Order_Number) Else Hide Control(FC Sales Order Number) Hide Control(FC st_Order_Number) Show Grid Column(FC Grid, GC OrderNo.) Show Grid Column(FC Grid, GC OrderType) End If Set Control Text(FC st_Invoice_Number, FC Document Number) Set Control Text(FC st_Order_Number, FC Order Number) Press Button(HC F&ind)

======================================================================= CONTROL: CHKBOX Foreign EVENT: Selection Changed ----------------------------------------------------------------------evt_cYesNo_EV01 0001 Press Button(HC F&ind) 0002 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 0003 // SAR 2577567 YZ5947480 03/18/99 0004 // The following part of the event rules 0005 // is redundant to those of "Click FIND button". Also actually this part o f 0006 // event ruls takes no effect while the program runs. 0007 ! // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 0008 ! // ============================================================== 0009 ! // Check that both Order Number and Invoice Number are not blank. At leas t one o 0010 ! // them must be entered. 0011 ! // ============================================================== 0012 ! // 0013 ! If FC Document Number is less than or equal to <Zero> And FC Order Numbe r is less than or equal to <Zero> 0014 ! Set Control Error(FC Document Number, "4028") 0015 ! Set Control Error(FC Order Number, "4028") 0016 ! Suppress Find 0017 ! Else 0018 ! // 0019 ! // =============================================================== 0020 ! // Disable Hyper Control options to Form & Row Exits. They will be ena bled one 0021 ! // all data has been displayed in the grid (Rec. Count > 0) 0022 ! // 0023 ! Disable Control(HC Discou&nt Summary) 0024 ! Disable Control(HC Ta&x Summary) 0025 ! Disable Control(HC O&rder Address)

0026 ! Disable Control(HC &Order Attachment) 0027 ! Disable Control(HC Order Dat&es) 0028 ! Disable Control(HC Order &Detail) 0029 ! Disable Control(HC &Invoice Attachment) 0030 ! FC MATH06-Rec. Count [HIDDEN] = "0" 0031 ! // 0032 ! // =============================================================== 0033 ! // Reset Totals to zero. 0034 ! // =============================================================== 0035 ! // 0036 ! FC MATH05-Order Total [HIDDEN] = "0" 0037 ! FC WTLB-Total Weight [HIDDEN] = "0" 0038 ! FC ITVL-Total Volume [HIDDEN] = "0" 0039 ! FC ATXA-Tot.Taxable Amt [HIDDEN] = "0" 0040 ! FC STAM-Total Tax Amt. [HIDDEN] = "0" 0041 ! // 0042 ! // =============================================================== 0043 ! // Set change in tax SW to OFF. 0044 ! // =============================================================== 0045 ! // 0046 ! FC EV07-Chg in Tax SW [HIDDEN] = "0" 0047 ! FC VC10A-Store Tax Area [HIDDEN] = " " 0048 ! // 0049 ! // =============================================================== 0050 ! // Reset link-list only after record is fetched 0051 ! // 0052 ! If FC EV05-First Time SW is equal to <Zero> 0053 ! // 0054 ! // =============================================================== 0055 ! // Call Discount Store/Get routine in destroy mode to clear previo us array from 0056 ! // memory. Immediately following this, call again in initialize mod e to create a 0057 ! // new array for this Find. 0058 ! // =============================================================== 0059 ! // 0060 ! F4211 Accumulate Payment Term Discount ! "4" -> BF cStoreGetOrInitialize ! <Zero> -> BF cSuppressErrorMsg ! FC GENLNG-Discount Ptr. [HIDDEN] -> BF idPtrToDiscountList 0061 ! F4211 Accumulate Payment Term Discount ! "3" -> BF cStoreGetOrInitialize ! <Zero> -> BF cSuppressErrorMsg ! FC GENLNG-Discount Ptr. [HIDDEN] <- BF idPtrToDiscountList 0062 ! // 0063 ! // =============================================================== 0064 ! // Repeat above for the tax Summary Store/Get routine. This routin e stores two 0065 ! // arrays, by group & by area/Authority codes. The third is removed from memory. 0066 ! // We do not use it in this application. 0067 ! // =============================================================== 0068 ! // 0069 ! VA evt_cYesNo_EV01 = "N" 0070 ! F4211 Accumulate Sales Tax Summary ! "4" -> BF cStoreGetOrInitialize ! VA evt_cYesNo_EV01 -> BF cStoreTaxAreaExplCode ! FC GENLN2-Grp Array Ptr. [HIDDEN] -> BF idPtrToGroupArray ! FC GENLN3-Area Arr. Ptr. [HIDDEN] -> BF idPtrToAreaAndAuthority ! <Zero> -> BF cSuppressErrorMsg

0071

0072 0073 0074 0075 0076

! VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive ! VA frm_szAuthority1Desc_DL01 -> BF szAuthority1Description ! VA frm_szAuthority2Desc_DL01 -> BF szAuthority2Description ! VA frm_szAuthority3Desc_DL01 -> BF szAuthority3Description ! VA frm_szAuthority4Desc_DL01 -> BF szAuthority4Description ! VA frm_szAuthority5Desc_DL01 -> BF szAuthority5Description ! F4211 Accumulate Sales Tax Summary ! "3" -> BF cStoreGetOrInitialize ! VA evt_cYesNo_EV01 -> BF cStoreTaxAreaExplCode ! FC GENLN2-Grp Array Ptr. [HIDDEN] <- BF idPtrToGroupArray ! FC GENLN3-Area Arr. Ptr. [HIDDEN] <- BF idPtrToAreaAndAuthority ! "1" -> BF idPtrToAreaExplanation ! <Zero> -> BF cSuppressErrorMsg ! VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive ! VA frm_szAuthority1Desc_DL01 -> BF szAuthority1Description ! VA frm_szAuthority2Desc_DL01 -> BF szAuthority2Description ! VA frm_szAuthority3Desc_DL01 -> BF szAuthority3Description ! VA frm_szAuthority4Desc_DL01 -> BF szAuthority4Description ! VA frm_szAuthority5Desc_DL01 -> BF szAuthority5Description ! End If ! // =============================================================== ! // Set First Time switch ON ! FC EV05-First Time SW [HIDDEN] = "1" ! End If

======================================================================= CONTROL: BUTTON Detached Adj Tax [HIDDEN] EVENT: Button Clicked ----------------------------------------------------------------------evt_mnItemGrpDetachAdj_MATH08 evt_cSuppressDiscount_EV01 0001 FC MATH01-Zero Tax Net [HIDDEN] = "0" 0002 FC MATH02-Tax Net Amt [HIDDEN] = FC MATH04-Disc Net Amt [HIDDEN] 0003 // 0004 // Load parameters to Tax Calculator based on the taxable Y/N flag of t he 0005 // adjustment. 0006 // 0007 If VA frm_cTaxableYN_TXB is not equal to "Y" And VA frm_cTaxableYN_TXB is n ot equal to "3-8" 0008 VA frm_mnTaxItemGrp_MATH08 = "0" 0009 FC MATH01-Zero Tax Net [HIDDEN] = FC MATH02-Tax Net Amt [HIDDEN] 0010 FC MATH02-Tax Net Amt [HIDDEN] = "0" 0011 VA frm_szTaxExplanation_EXR1 = " " 0012 VA frm_szTaxArea_TXA1 = " " 0013 End If 0014 // 0015 // Blank out the Payment Terms if defined to exclude discounts in the 0016 // adjustment. 0017 // 0018 // SAR 5266975 - Do not reset Payment Terms Code 0019 // calculation. 0020 ! If VA frm_cExcludeFromDiscount_PA03 is equal to "1" 0021 ! VA frm_szPaymentTerms_PTC = " " 0022 ! End If 0023 // End SAR 5266975 0024 // 0025 // If non-taxable, call Calculate Discount Amount bsfn to calc ulate th e 0026 // discount, otherwise, if the Discount Net Amount is 0, override the

0027 // Discount Available Amount to zero. 0028 // 0029 If VA frm_cTaxableYN_TXB is equal to "N" Or VA frm_szTaxExplanation_EXR1 is equal to <Blank> And VA frm_szTaxArea_TXA1 is equal to <Blank> 0030 FC AEXP-Non-Tax Gross [HIDDEN] = FC MATH04-Net Amount [HIDDEN] 0031 // SAR 5266975 - Suppress Discount Calculation 0032 If VA frm_cExcludeFromDiscount_PA03 is equal to "1" 0033 FC ADSC-Disc Avail Amt [HIDDEN] = "0" 0034 Else 0035 Calculate Discount Amount No Taxes VA frm_szPaymentTerms_PTC -> BF szPaymentTermsCode FC AEXP-Non-Tax Gross [HIDDEN] -> BF mnAmountGross FC ADSC-Disc Avail Amt [HIDDEN] <- BF mnAmtDiscountAvailable 0036 End If 0037 FC MATH02-Add. Dis. Amt [HIDDEN] = FC MATH04-Net Amount [HIDDEN] 0038 Else 0039 If VA frm_cTaxableYN_TXB is equal to "Y" Or VA frm_cTaxableYN_TXB is equ al to "N" 0040 VA frm_mnTaxItemGrp_MATH08 = "1" 0041 Else 0042 If VA frm_cTaxableYN_TXB is equal to "3-8" 0043 Character to Math Numeric, Convert VA frm_cTaxableYN_TXB -> BF cCharacter VA frm_mnTaxItemGrp_MATH08 <- BF mnMathNumeric 0044 End If 0045 End If 0046 // 0047 // Call Tax Calculator to calculate the tax and discount amounts. 0048 // 0049 // SAR 3495310 Begin. 0050 // Passed '4' into system code to fix issue of tax on gross excluding di scount. 0051 VA frm_mnTaxableAmount_MATH04 = FC MATH04-Net Amount [HIDDEN] 0052 // 0053 // Passing values into added parameters under SAR#1469038, 12/22/98 0054 // SAR 5266975 - Pass in new Suppress Discount Calculation flag. 0055 Tax, Calculate for Sales and Purchasing VA frm_szTaxArea_TXA1 -> BF szTaxArea1 VA frm_szTaxExplanation_EXR1 -> BF szTaxExplanationCode1 VA frm_jdInvoiceDateForTax_IVD -> BF jdTransactionDate VA frm_szPaymentTerms_PTC -> BF szPaymentTermsCode1 BC Company (F4211) -> BF szCompany VA frm_mnTaxItemGrp_MATH08 -> BF mnShortItemNumber FC MATH01-Qty Supplied [HIDDEN] -> BF mnUnitsPrimaryQtyOrder VA frm_mnTaxableAmount_MATH04 <> BF mnAmountTaxable FC STAM-Amount of Tax [HIDDEN] <- BF mnAmtTax2 FC ADSC-Disc Avail Amt [HIDDEN] <- BF mnAmtDiscountAvailable FC TXR1-Tax Rate 1 (wf) [HIDDEN] <- BF mnTaxRate1 FC TXR2-Tax Rate 2 (wf) [HIDDEN] <- BF mnTaxRate2 FC TXR3-Tax Rate 3 (wf) [HIDDEN] <- BF mnTaxRate3 FC TXR4-Tax Rate 4 (wf) [HIDDEN] <- BF mnTaxRate4 FC TXR5-Tax Rate 5 (wf) [HIDDEN] <- BF mnTaxRate5 FC TA1-Tax Authority 1 [HIDDEN] <- BF mnTaxAuthority1A FC TA2-Tax Authority 2 [HIDDEN] <- BF mnTaxAuthority2 FC TA3-Tax Authority 3 [HIDDEN] <- BF mnTaxAuthority3 FC TA4-Tax Authority 4 [HIDDEN] <- BF mnTaxAuthority4 FC TA5-Tax Authority 5 [HIDDEN] <- BF mnTaxAuthority5 FC TC2-Calc Method 2 [HIDDEN] <- BF cTaxCalcMethod2 FC TT3-Tax Type 3 (wf) [HIDDEN] <- BF cTaxType3 FC TT4-Tax Type 4 (wf) [HIDDEN] <- BF cTaxType4

FC TT5-Tax Type 5 (wf) [HIDDEN] <- BF cTaxType5 FC TAXA-Tax Area Desc. [HIDDEN] <- BF szDescriptionTaxArea FC TRAT-Total Area Rate [HIDDEN] <- BF mnTotalAreaTaxRate FC FVTY-Factor Type (wf) [HIDDEN] <- BF cFactorValueType FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode "4" <> BF cSystemCode VA frm_SummaryLevelTaxCalculati <- BF cSummaryDetailFlag FC EV09-Item Used Flag [HIDDEN] <- BF cItemNumberUsedFlag VA frm_mnVertexJobNumber_JOBS -> BF mnJobnumberA VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive VA frm_szAuthority1Desc_DL01 <- BF szAuthority1Desc VA frm_szAuthority3Desc_DL01 <- BF szAuthority3Desc VA frm_szAuthority2Desc_DL01 <- BF szAuthority2Desc VA frm_szAuthority5Desc_DL01 <- BF szAuthority5Desc VA frm_szAuthority4Desc_DL01 <- BF szAuthority4Desc BC Document (Order No, Invoice, etc.) (F4211) -> BF mnDocumentOrderIn voiceE BC Order Type (F4211) -> BF szOrderType BC Order Company (Order Number) (F4211) -> BF szCompanyKeyOrderNo "000" -> BF szOrderSuffix BC Line Number (F4211) -> BF mnLineNumber 0056 // SAR 3495310 End. 0057 FC STAM-Tax Amt of Tax [HIDDEN] = FC STAM-Amount of Tax [HIDDEN] 0058 FC MATH02-Add. Dis. Amt [HIDDEN] = FC MATH04-Disc Net Amt [HIDDEN] 0059 If FC MATH04-Disc Net Amt is equal to <Zero> 0060 FC ADSC-Disc Avail Amt [HIDDEN] = "0" 0061 End If 0062 End If 0063 // 0064 F4211 Accumulate Payment Term Discount "1" -> BF cStoreGetOrInitialize VA frm_szPaymentTerms_PTC <> BF szPaymentTermsCode FC MATH04-Disc Net Amt [HIDDEN] <> BF mnExtendedPrice FC ADSC-Disc Avail Amt [HIDDEN] <> BF mnDiscountAmount <Zero> -> BF cSuppressErrorMsg FC GENLNG-Discount Ptr. [HIDDEN] <> BF idPtrToDiscountList 0065 // 0066 FC ERRC-Gen. Error Flag [HIDDEN] = "0" 0067 If VA frm_szTaxArea_TXA1 is greater than <Blank> 0068 If FC MATH02-Tax Net Amt is equal to <Zero> 0069 FC STAM-Tax Amt of Tax [HIDDEN] = "0" 0070 End If 0071 If VA frm_cValidGeoCode_EV01 is equal to "1" And VA frm_cIsvertexActive _VVTX is equal to "1" 0072 F4211 Accumulate Sales Tax Summary "1" -> BF cStoreGetOrInitialize "N" -> BF cStoreTaxAreaExplCode VA frm_szTaxArea_TXA1 -> BF szTaxArea VA frm_szTaxExplanation_EXR1 -> BF szTaxExplanationCode FC TAXA-Tax Area Desc. [HIDDEN] -> BF szTaxAreaDesc FC MATH02-Tax Net Amt [HIDDEN] -> BF mnTaxableAmount FC STAM-Tax Amt of Tax [HIDDEN] -> BF mnAmountOfTax FC TRAT-Total Area Rate [HIDDEN] -> BF mnTotalTaxRateByArea FC FVTY-Factor Type (wf) [HIDDEN] -> BF cFactorType BC Sales Taxable (Y/N) (F4211) -> BF cTaxableYN VA evt_mnItemGrpDetachAdj_MATH08 -> BF mnShortItemNumber FC MATH01-Zero Tax Net [HIDDEN] -> BF mnTaxableAmountNet FC TXR1-Tax Rate 1 (wf) [HIDDEN] -> BF mnTaxRate1 FC TXR2-Tax Rate 2 (wf) [HIDDEN] -> BF mnTaxRate2 FC TXR3-Tax Rate 3 (wf) [HIDDEN] -> BF mnTaxRate3

FC TXR4-Tax Rate 4 (wf) [HIDDEN] -> BF mnTaxRate4 BC Line Number (F4211) -> BF mnTaxRate5 FC TA1-Tax Authority 1 [HIDDEN] -> BF mnTaxAuthority1 FC TA2-Tax Authority 2 [HIDDEN] -> BF mnTaxAuthority2 FC TA3-Tax Authority 3 [HIDDEN] -> BF mnTaxAuthority3 FC TA4-Tax Authority 4 [HIDDEN] -> BF mnTaxAuthority4 VA frm_mnVertexJobNumber_JOBS -> BF mnTaxAuthority5 FC TC2-Calc Method 2 [HIDDEN] -> BF cTaxCalcMethod FC TT3-Tax Type 3 (wf) [HIDDEN] -> BF cTaxType3 FC TT4-Tax Type 4 (wf) [HIDDEN] -> BF cTaxType4 FC TT5-Tax Type 5 (wf) [HIDDEN] -> BF cTaxType5 <Zero> -> BF cControlFlag FC GENLN2-Grp Array Ptr. [HIDDEN] <> BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] <> BF idPtrToAreaAndAuthority FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode <Zero> -> BF cSuppressErrorMsg <Zero> -> BF mnForeignNonTaxableAmt VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive VA frm_szAuthority1Desc_DL01 -> BF szAuthority1Description VA frm_szAuthority2Desc_DL01 -> BF szAuthority2Description VA frm_szAuthority3Desc_DL01 -> BF szAuthority3Description VA frm_szAuthority4Desc_DL01 -> BF szAuthority4Description VA frm_szAuthority5Desc_DL01 -> BF szAuthority5Description VA frm_jdInvoiceDateForTax_IVD -> BF jdDateTax 0073 0074 Else F4211 Accumulate Sales Tax Summary "1" -> BF cStoreGetOrInitialize "N" -> BF cStoreTaxAreaExplCode VA frm_szTaxArea_TXA1 -> BF szTaxArea VA frm_szTaxExplanation_EXR1 -> BF szTaxExplanationCode FC TAXA-Tax Area Desc. [HIDDEN] -> BF szTaxAreaDesc FC MATH02-Tax Net Amt [HIDDEN] -> BF mnTaxableAmount FC STAM-Tax Amt of Tax [HIDDEN] -> BF mnAmountOfTax FC TRAT-Total Area Rate [HIDDEN] -> BF mnTotalTaxRateByArea FC FVTY-Factor Type (wf) [HIDDEN] -> BF cFactorType BC Sales Taxable (Y/N) (F4211) -> BF cTaxableYN VA evt_mnItemGrpDetachAdj_MATH08 -> BF mnShortItemNumber FC MATH01-Zero Tax Net [HIDDEN] -> BF mnTaxableAmountNet FC TXR1-Tax Rate 1 (wf) [HIDDEN] -> BF mnTaxRate1 FC TXR2-Tax Rate 2 (wf) [HIDDEN] -> BF mnTaxRate2 FC TXR3-Tax Rate 3 (wf) [HIDDEN] -> BF mnTaxRate3 FC TXR4-Tax Rate 4 (wf) [HIDDEN] -> BF mnTaxRate4 FC TXR5-Tax Rate 5 (wf) [HIDDEN] -> BF mnTaxRate5 FC TA1-Tax Authority 1 [HIDDEN] -> BF mnTaxAuthority1 FC TA2-Tax Authority 2 [HIDDEN] -> BF mnTaxAuthority2 FC TA3-Tax Authority 3 [HIDDEN] -> BF mnTaxAuthority3 FC TA4-Tax Authority 4 [HIDDEN] -> BF mnTaxAuthority4 FC TA5-Tax Authority 5 [HIDDEN] -> BF mnTaxAuthority5 FC TC2-Calc Method 2 [HIDDEN] -> BF cTaxCalcMethod FC TT3-Tax Type 3 (wf) [HIDDEN] -> BF cTaxType3 FC TT4-Tax Type 4 (wf) [HIDDEN] -> BF cTaxType4 FC TT5-Tax Type 5 (wf) [HIDDEN] -> BF cTaxType5 <Zero> -> BF cControlFlag FC GENLN2-Grp Array Ptr. [HIDDEN] <> BF idPtrToGroupArray FC GENLN3-Area Arr. Ptr. [HIDDEN] <> BF idPtrToAreaAndAuthority FC ERRC-Gen. Error Flag [HIDDEN] <- BF cErrorCode <Zero> -> BF cSuppressErrorMsg <Zero> -> BF mnForeignNonTaxableAmt VA frm_cIsvertexActive_VVTX -> BF cIsVertexActive VA frm_szAuthority1Desc_DL01 -> BF szAuthority1Description

VA VA VA VA VA

frm_szAuthority2Desc_DL01 -> BF szAuthority2Description frm_szAuthority3Desc_DL01 -> BF szAuthority3Description frm_szAuthority4Desc_DL01 -> BF szAuthority4Description frm_szAuthority5Desc_DL01 -> BF szAuthority5Description frm_jdInvoiceDateForTax_IVD -> BF jdDateTax

0075 End If 0076 // SAR 4552355 End 0077 End If 0078 // 0079 // Accumulate Total Taxable Amount and Total Tax Amount. 0080 // 0081 If VA frm_cTaxableYN_TXB is not equal to "N" And FC ERRC-Gen. Error Flag is not equal to "1" 0082 // 0083 // SAR 3495310 Begin. 0084 // Sumup the total taxable amount using the VA mnTaxableAmount Var. 0085 // 0086 FC ATXA-Tot.Taxable Amt [HIDDEN] = FC ATXA-Tot.Taxable Amt [HIDDEN]+VA f rm_mnTaxableAmount_MATH04 0087 // SAR 3495310 End. 0088 FC STAM-Total Tax Amt. [HIDDEN] = FC STAM-Total Tax Amt. [HIDDEN]+FC STA M-Amount of Tax [HIDDEN] 0089 End If ======================================================================= CONTROL: BUTTON Close [HIDDEN] EVENT: Button Clicked ----------------------------------------------------------------------0001 // 0002 // SAR 5282019 0003 // 0004 Press Button(HC &Close) ======================================================================= CONTROL: TEXT BLOCK Advanced Search [HIDDEN] EVENT: Text Clicked ----------------------------------------------------------------------evt_cStartingPoint 0001 // 0002 // SAR 5282019 0003 // 0004 VA evt_cStartingPoint = "1" 0005 Call( App:P42230 , Form: W42230B ) VA frm_mnSearchReturnOrder_DOCO <> FI mnSalesOrderNumber VA frm_mnSearchReturnDocument_DOC <> FI mnSalesInvoiceNumber VA evt_cStartingPoint <> FI cInitiatedAppFrom 0006 // 0007 Hide Grid Column(FC Grid, GC InvoiceNo.) 0008 Hide Grid Column(FC Grid, GC InvoiceType) 0009 Hide Grid Column(FC Grid, GC OrderNo.) 0010 Hide Grid Column(FC Grid, GC OrderType) 0011 If VA frm_mnSearchReturnDocument_DOC is not equal to <Blank> And VA frm_mn SearchReturnDocument_DOC is not equal to <Null> 0012 FC Document Number = VA frm_mnSearchReturnDocument_DOC 0013 Show Control(FC Sales Invoice Number) 0014 Show Control(FC st_Invoice_Number) 0015 Else 0016 FC Document Number = " " 0017 Hide Control(FC Sales Invoice Number) 0018 Hide Control(FC st_Invoice_Number)

0019 Show Grid Column(FC Grid, GC InvoiceNo.) 0020 Show Grid Column(FC Grid, GC InvoiceType) 0021 End If 0022 // 0023 FI Docvoucherinvoicee = FC Document Number 0024 // 0025 If VA frm_mnSearchReturnOrder_DOCO is not equal to <Blank> And VA frm_mnSe archReturnOrder_DOCO is not equal to <Null> 0026 FC Order Number = VA frm_mnSearchReturnOrder_DOCO 0027 Show Control(FC Sales Order Number) 0028 Show Control(FC st_Order_Number) 0029 Else 0030 FC Order Number = " " 0031 Hide Control(FC Sales Order Number) 0032 Hide Control(FC st_Order_Number) 0033 Show Grid Column(FC Grid, GC OrderNo.) 0034 Show Grid Column(FC Grid, GC OrderType) 0035 End If 0036 // 0037 FI DocumentOrderInvoiceE = FC Order Number 0038 // 0039 Set Control Text(FC st_Invoice_Number, FC Document Number) 0040 Set Control Text(FC st_Order_Number, FC Order Number) 0041 // 0042 IfVA frm_mnSearchReturnDocument_DOCis not equal to<Blank>OrVA frm_mnSearchR eturnDocument_DOCis not equal to<Null>OrVA frm_mnSearchReturnOrder_DOCOis not eq ual to<Blank>AndVA frm_mnSearchReturnOrder_DOCOis not equal to<Null> 0043 Press Button(HC F&ind) 0044 End If 0045 // ======================================================================= CONTROL: TEXT BLOCK Tax Summary [HIDDEN] EVENT: Text Clicked ----------------------------------------------------------------------0001 // 0002 // SAR 5282019 0003 // 0004 Call( App:P42235 , Form: W42235A ) BC Document (Order No, Invoice, etc.) (F4211) <> FI DocumentOrderInvoice E FC GENLN2-Grp Array Ptr. [HIDDEN] <> FI Ptr To Array 1 FC GENLN3-Area Arr. Ptr. [HIDDEN] <> FI Ptr To Array 2 FC EV07-Chg in Tax SW [HIDDEN] <> FI Change in Tax Flag FC Currency Code -> FI CurrencyCode VA frm_cIsvertexActive_VVTX -> FI cIsVertexActive BC Date - Order/Transaction (F4211) -> FI TransactionDate PO cWeb_Enable -> FI cWeb_Enable ======================================================================= CONTROL: TEXT BLOCK Discount Summary [HIDDEN] EVENT: Text Clicked ----------------------------------------------------------------------0001 // 0002 // SAR 5282019 0003 // 0004 Call( App:P42240 , Form: W42240A ) FC Order Number <> FI DocumentOrderInvoiceE FC GENLNG-Discount Ptr. [HIDDEN] <> FI Ptr to Discount Array FC Currency Code -> FI CurrencyCode

PO cWeb_Enable -> FI cWebEnable ======================================================================= CONTROL: BUTTON Write Kit Parent Rows [HIDDEN] EVENT: Button Clicked ----------------------------------------------------------------------evt_szTempWorkString_DSC1 evt_mnTempWorkMN_KITAMTDOM evt_iParentSplitMayExist_INT01 0001 // SAR 8150388: iWriteKitParentRows_INT01 is a "1" for conditional printin g 0002 // of the parent rows (for when the last kit item is displayed) and "2" for 0003 // unconditional printing (when Last Grid Record is Read runs). 0004 If VA frm_iWriteKitParentRows_INT01 is equal to "1,2" 0005 If VA frm_iWriteKitParentRows_INT01 is equal to "2" Or BC Document (Orde r No, Invoice, etc.) (F4211) is not equal to VA frm_mnKitCmpntLastOrdNo_DOCO Or BC Order Type (F4211) is not equal to VA frm_szKitCmpntLastOrdType_DCTO Or BC Or der Company (Order Number) (F4211) is not equal to VA frm_szKitCmpntLastOrdCo_KC OO 0006 // 0007 // To reduce potential redundancy, do not display kit parent informat ion if it 0008 // already appears in the grid. (If the parent is in the cache, it d oes 0009 // appear already.) 0010 // 0011 VA frm_iWriteKitParentRows_INT01 = "0" 0012 // 0013 If VA frm_cKitParentDisplayed_EV01 is not equal to "1" 0014 Clear Grid Buffer(FC Grid) 0015 VA frm_cKitParentDisplayed_EV01 = "1" 0016 // 0017 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0018 Convert mnQuantity To A String with Decimals VA frm_mnParentAmtExtPrice_AEXP -> BF mnQuantityToConvert VA evt_szTempWorkString_DSC1 <- BF szReturnString_wLSign 0019 Else 0020 Convert mnQuantity To A String with Decimals VA frm_mnParentForAmtExtPrice_FEA -> BF mnQuantityToConvert VA evt_szTempWorkString_DSC1 <- BF szReturnString_wLSign 0021 End If 0022 GB Description = concat(TV Kit Extended Price [HIDDEN],concat (": ",VA evt_szTempWorkString_DSC1)) 0023 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No >, <Yes>, <Yes>) 0024 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01+1 0025 // 0026 // When a parent is uninvoiced, the previously invc. amt. is the t able amt. 0027 // less what we have displayed. Otherwise, we cannot rely on the previously 0028 // invc. amt. since component invoicing may not have invoiced the parent in 0029 // full. Assume a fully invoiced parent in that scenario. 0030 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0031 If VA frm_mnKitParentInvcNo_DOC is greater than <Zero> 0032 VA evt_mnTempWorkMN_KITAMTDOM = VA frm_mnParentAmtExtPrice_A EXP-VA frm_mnCalcAccAmtDom_KITAMTDOM

0033 Else 0034 VA evt_mnTempWorkMN_KITAMTDOM = VA frm_mnAccInvcAmtDom_KITAM TDOM-VA frm_mnCalcAccAmtDom_KITAMTDOM 0035 End If 0036 Else 0037 If VA frm_mnKitParentInvcNo_DOC is greater than <Zero> 0038 VA evt_mnTempWorkMN_KITAMTDOM = VA frm_mnParentForAmtExtPric e_FEA-VA frm_mnCalcAccAmtFor_KITAMTFOR 0039 Else 0040 VA evt_mnTempWorkMN_KITAMTDOM = VA frm_mnAccInvcAmtFor_KITAM TFOR-VA frm_mnCalcAccAmtFor_KITAMTFOR 0041 End If 0042 End If 0043 If VA evt_mnTempWorkMN_KITAMTDOM is not equal to <Zero> And VA evt _mnTempWorkMN_KITAMTDOM is not equal to <Blank> And VA evt_mnTempWorkMN_KITAMTDO M is not equal to <Null> 0044 VA evt_szTempWorkString_DSC1 = "" 0045 Convert mnQuantity To A String with Decimals VA evt_mnTempWorkMN_KITAMTDOM -> BF mnQuantityToConvert VA evt_szTempWorkString_DSC1 <- BF szReturnString_wLSign 0046 GB Description = concat(TV Kit Invoiced To Date [HIDDEN],c oncat(": ",VA evt_szTempWorkString_DSC1)) 0047 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0048 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01 +1 0049 End If 0050 // 0051 If SL CurrencyProcessing is equal to "N" Or FC Foreign is equal to "D" 0052 If VA frm_mnCmpntAmtExtPrice_AEXP is greater than <Zero> 0053 // Non-credits. 0054 If VA frm_mnCalcAccAmtDom_KITAMTDOM is greater than VA frm_m nParentAmtExtPrice_AEXP 0055 VA evt_iParentSplitMayExist_INT01 = "1" 0056 End If 0057 Else 0058 If VA frm_mnCmpntAmtExtPrice_AEXP is less than <Zero> 0059 // Credits. 0060 If VA frm_mnCalcAccAmtDom_KITAMTDOM is less than VA frm_m nParentAmtExtPrice_AEXP 0061 VA evt_iParentSplitMayExist_INT01 = "1" 0062 End If 0063 End If 0064 End If 0065 Else 0066 If VA frm_mnCmpntForAmtExtPrice_FEA is greater than <Zero> 0067 // Non-credits. 0068 If VA frm_mnCalcAccAmtFor_KITAMTFOR is greater than VA frm_m nParentForAmtExtPrice_FEA 0069 VA evt_iParentSplitMayExist_INT01 = "1" 0070 End If 0071 Else 0072 If VA frm_mnCmpntForAmtExtPrice_FEA is less than <Zero> 0073 // Credits. 0074 If VA frm_mnCalcAccAmtFor_KITAMTFOR is less than VA frm_m nParentForAmtExtPrice_FEA 0075 VA evt_iParentSplitMayExist_INT01 = "1" 0076 End If 0077 End If

0078 End If 0079 End If 0080 If VA evt_iParentSplitMayExist_INT01 is equal to "1" 0081 GB Description = TV (Kit parent may have split after compo nent invoicing.) [HIDDEN] 0082 Insert Grid Buffer Row(FC Grid, <After Last Row>, <No>, <Yes>, <No>, <Yes>, <Yes>) 0083 VA frm_iCurrentGridRowNo_INT01 = VA frm_iCurrentGridRowNo_INT01 +1 0084 End If 0085 // 0086 // Update the parent's display (update) flag. (We use this flag t o indicate 0087 // that we have displayed the parent's details and will not displa y them a 0088 // second time.) 0089 VA frm_cKitParentDisplayed_EV01 = "1" 0090 Kit Invoicing Cache Update VA frm_mnKitCmpntLastOrdNo_DOCO -> BF mnOrderNumber_DOCO VA frm_szKitCmpntLastOrdType_DCTO -> BF szOrderType_DCTO VA frm_szKitCmpntLastOrdCo_KCOO -> BF szOrderCompany_KCOO VA frm_mnKitParentLastLineNo_KTLN -> BF mnLineNumber_LNID VA frm_mnAccInvcAmtDom_KITAMTDOM -> BF mnDomesticAccAmtTbl_KITA MTDOM VA frm_mnAccInvcAmtFor_KITAMTFOR -> BF mnForeignAccAmtTbl_KITAM TFOR VA frm_mnCalcAccAmtDom_KITAMTDOM -> BF mnDomesticAccAmtNew_KITA MTDOM VA frm_mnCalcAccAmtFor_KITAMTFOR -> BF mnForeignAccAmtNew_KITAM TFOR VA frm_mnParentAmtExtPrice_AEXP -> BF mnAmountExtendedPrice_AEX P VA frm_mnParentForAmtExtPrice_FEA -> BF mnForeignAmtExtendedPri ce_FEA VA frm_cKitParentDisplayed_EV01 -> BF cUpdateF4211Flag_EV01 "1" -> BF iIndexNumber_INT01 "4" -> BF iNumberOfKeys_INT02 VA frm_mnKitInvcngCacheJobNo_JOBS <> BF mnJobNumber_JOBS VA frm_mnKitParentInvcNo_DOC -> BF mnDocVoucherInvoice_DOC VA frm_szKitParentInvoiceType_DCT -> BF szDocumentType_DCT VA frm_szKitParentInvcCompany_KCO -> BF szDocumentCompany_KCO 0091 End If 0092 End If 0093 End If

You might also like