R5542B3

From Invoicing
Jump to: navigation, search
  • [R5542B3 - Invoice Validation]
  1. Page Header Section:
    1. Normal Fields
    2. Mode = Proof / Final (Based on PO_FinalMode)
  2. Section 1: PreRead (Validations)
    1. Based on join of F4211, F4941
    2. Sort by VMCU + LDNM + KCOO + DCTO + DOCO + LNID
    3. Level Break header on DOCO
    4. Level Break Header Fields
      1. Load Branch
      2. Load Number
      3. Order Company
      4. Order Type
      5. Order Number
      6. Sold To Id
      7. Sold To Name
      8. Delivery Method
      9. Pick Status
      10. New Status
      11. Error Id
      12. Error Description
      13. Total Quantity W
      14. Total Price W
      15. Total Quantity SC
      16. Total Price SC
    5. Level Break Header Logic
      1. Call SFValidateSameShippingDate
      2. If return error, show the error and its associated description
      3. Call SFValidateOrderActivityRules for PO_Status_OrdVal
      4. Call SFValidateOrderActivityRules for PO_Status_AcctgVal
      5. Call SFValidateOrderActivityRules for PO_Status_NoVal
      6. Call SFValidateDeliveryMethod for the current line
      7. Call SFValidateShippingDate for the current line
      8. Call SFValidateSurcharges
      9. If Valid So Far (No Errors)
        1. Call SFCalculateOrderTotals
        2. If FinalMode = 1
          1. Update Invoice Fields
            1. Call Next Number function X0010 to get the next invoice number ⇒ VA_InvoiceNumber
            2. Set VA_InvoiceType = PO_DocumentType
            3. Set VA_InvoiceDate = TodaysDate
            4. Set VA_InvoiceCompany = OrderCompany
    6. Do Section Fields
      1. Order Number
      2. Order Line
      3. Quantity
      4. Currency
      5. Unit Price
      6. Ext Price
      7. Actual Ship Date
    7. Do Section Logic
      1. If no error, then
        1. If FinalMode = 1
          1. Update F4211 or the current line with
            1. LTTR ⇐ Current Status
            2. NXTR ⇐ New Status
            3. KCO ⇐ Invoice Company
            4. DCT ⇐ Invoice Type
            5. DOC ⇐ Invoice Number
            6. IVD ⇐ Invoice Date
          2. Write to F42199 Ledger using business function
          3. Update F554211 for current line
            1. LIID
            2. Y55DELVMTH
          4. Update Orig_SC_Line with W_Qty
          5. Add a new SC Line with remaining qty (N5542IV)
    8. Level Break Footer
      1. If no errors, Call SFCalcUpdSurchargeLine


invoicing