Páginas filhas
  • FAT0008 Group Sales Orders and Items in Billing

Configuration to Group Sales Orders and Items in Billing

Product:

Protheus

Versions:

From version 11 onwards

Occurrence:

Grouping of Sales Orders and Items in Billing

Environment:Billing

Step by step:

Index



    Grouping of items in sales order/outbound document records

    KCS: Cross Segments - TOTVS Backoffice (Protheus Line) - SIGAFAT (Billing) - Grouping of items in billing


    When a given product is added to the Sales Order and it has references, such as Batch and Sub-batch, the information is registered in "N" lines in Table "SC9 - Sales Order Releases" and in Table "SD2 - Outgoing Invoice Items", in order to maintain data integrity and set up the proper relationships of each quantity with their respective reference.


    Even if, for example, a sufficient quantity of the same product is available to meet an Order; however, it is apportioned by 2 distinct Batches or Sub-batches, generating 2 different records (2 lines) in SC9 (in order to list each quantity with its respective batch and perform the system integrations correctly).


    Note:

    Thus, you cannot group the quantities of the same product in the invoice when two or more records are generated in Table SC9 for registration of references (DANFE is based on data from Table SD2, so it is generated the same way).


    Yet Series and Address controls are not recorded in Tables SC9 and SD2, but in SDC.

    Thus, when releasing the Stock, the system automatically selects the Addresses and Series (based on the FEFO concept), generating only one line in SC9.

    However, if manually released, it is imperative to manually select each Address/Series, then the release sequences C9_SEQUEN are generated in distinct lines of SC9.

    Likewise, if it is imperative to manually select each Address/Series (including "n" records for each address / series) when adding the order, they also proceed to SC9 and SD2 in different lines and are not grouped in the Invoice later.


    Notes

    If you need to change the criteria, the RDMAKE of Danfe is open for customizations. Request your GAR, Service and Relationship Manager with TOTVS, for our Software Factory to develop a solution that meets your needs.




    Grouping of different sales orders in an outbound document

    KCS: Cross Segments - TOTVS Backoffice (Protheus Line) - SIGAFAT (Billing) - Grouping of sales orders in billing


    To group more than one product in the outbound invoice, validate the following fields so they contain the same value, being effectively regarded as similar and grouped:

    - Order Type (C5_TIPO)
    - Customer (C5_CLIENTE)
    - Customer Store (C5_LOJACLI)
    - Customer Type (C5_TIPOCLI)
    - Delivery Customer (C5_CLIENT)
    - Delivery Store (C5_LOJAENT)
    - Adjustment Type (C5_REAJUST)
    - Payment Term (C5_CONDPAG) [as long as other than Type 9 as described below]
    - Sales Reps (C5_VEND'x') (All orders must have the same quantity of sales reps, the same codes registered, and in the same fields)
    - Freight Type (C5_TPFRETE)
    - Carrier (C5_TRANSP)
    - ISS Included (C5_INCISS)
    - Collect ISS (C5_RECISS)
    - Supplier ISS (C5_FORNISS)
    - Presence With (C5_INDPRES)


    Moreover, consider:

    1. In case of currencies other than the Default currencies, in "Updates > Registers > Currencies" the currency at issue (X) of the Sales Order must have a Rate registered for the Date of Invoice issue;

    2. Parameter MV_MOEDA(x) must be duly filled in and compatible with the Order;

    3. In routine MATA455 (Stock Release) the Statuses of the Orders must be Released;

    4. The payment terms must be different from Type 9, which is not used in this operation;

    5. In document preparation, in the browser of routine MATA460A, select the orders to be grouped (checkbox), click the button "Doc Prep.", select the question "Group Equal Orders?" and set it to "Yes"; thus, the system generates a single invoice with the grouped orders.

    6. With Invoice Layout 3.10, SEFAZ validates whether CFOP is compatible with the Invoice type specified in TAG FinNFE. Thus, in adaptation to SEFAZ, Invoices with Return CFOP must be generated with the TAG content = 4 (return) and the Sales CFOPs with TAG = 1 (Regular), no longer being in the same Invoice. Hence, no grouping occurs if the Orders lack compatible CFOPs (all for returns, for example);

    7. The content of parameter MV_NUMITEN, in which goes the maximum number of items per Invoice to automatically control the invoice break, must comprise the quantity of Orders Billable items.

    8. Integrations with Sales Order: Orders generated by the integrations of modules SIGAGCT and SIGATMK consolidate Orders in a single invoice, for as long as the aforementioned conditions (fields) are met.

    9. The volumes that correspond to equal kinds will be added, and those different will be distributed in fields F2_VOLUME'x' and F2_ESPECI’x’ in accordance with the processing sequence of the orders;that is, there may not necessarily be a match between C5_ESPECI1 and F2_ESPECI1.

    10. Net weight C5_PESOL and gross weight C5_PBRUTO are respectively added to the consolidation (See below for a saving example).

    Notes

    If the kinds of "n" orders can total five or more distinct kinds, you must create additional fields (F2_VOLUME'x' and F2_ESPECI’x’) in the invoice to receive the data. Example: F2_VOLUME5 and F2_ESPECI5. And so on.



      • Saving example:

        • SC5 - Sales Order Header

    Branch Order No. Kind 1 Volume 1 Kind 2 to 4 Volume 2 to 4 Net Weight Gross Weight Invoice
    01 000001 BOX 5 - - 1 2 000000120
    01 000002 PALLET 7 - - 1 2 000000120
    01 000003 COIL 10 - - 1 2 000000120
    01 000004 BOX 15 - - 1 2 000000120


      • SF2 - Cabeçalho das NF de Saída
    Branch Invoice Kind 1 Volume 1 Kind 2 Volume 2 Kind 3 Volume 3 Kind 4 Volume 4 Net Weight Gross Weight
    01 000000120 BOX 20 PALLET 7 COIL 10 - - 4 8



    Notes

    • The XML files to be transmitted to SEFAZ are limited by size and must not exceed 500 kB. If the invoice has many items, divide it in 2 or more invoices that do not exceed 500 kB.

    • Your environment must be up to date. Carefully following this procedure should consolidate the orders, unless your environment is outdated or with customizations that interfere with the process.

    • If you consolidate similar Sales Orders in a single invoice, only the information registered in C5_MENNOTA of last Order is transferred to F2_MENNOTA.

    • When you consolidate similar Sales Orders, but the value of shipping (C5_FRETE) was entered in only one of the orders, the apportionment value applies only to the items of this order. Items of other orders lacking the shipping information do not belong in the apportionment. If you need to apportion shipping among all items of consolidated orders, you must divide shipping between two or more consolidated orders.

    • When consolidating "n" Sales Orders in a single Invoice, the system does not consolidate equal Products; that is, the quantities of the same Product twice in a single line.



    Related Subjects: