# Quantity screen

### Replacing quantity screen (Orders, Sales, Deliveries and Services)&#x20;

This information is valid either for function 410, 510, 2410 and 3210, the input parameters are the same for Before, Replace and After. When Replacing must return values to MSS.&#x20;

*Input Parameters:*&#x20;

* inOpenMode – 0 new line, 1 when changing a line;&#x20;
* inDCCTPD – Type of the current document;&#x20;
* inDCCCLI – Code of the selected customer;&#x20;
* inCLIPRC – Line price of the customer (DCCACL.42 of the current document because it can be changed in the document)&#x20;
* inDCCLCE – Code of the selected delivery location;&#x20;
* inDCCDCG – Global discount;&#x20;
* inDCCDPP – Prompt payment discount;&#x20;
* inARTCOD – Code of the selected article;&#x20;
* inARTDSC – Description of the article;&#x20;
* inStock – Current Stock of the article;&#x20;
* inQty – Current quantity;&#x20;
* inUnit – Current selected unit;&#x20;
* inPrice – Current price;&#x20;
* inDiscount1 – Current discount 1;&#x20;
* inDiscount2 – Current discount 2;&#x20;
* inDiscount3 – Current discount 3;&#x20;
* inDiscount4 – Current discount 4;&#x20;
* inOriginalPrice – Original price given by MSS;&#x20;
* inOriginalDisc1 – Original discount 1 given by MSS;&#x20;
* inOriginalDisc2 – Current discount 2 given by MSS;&#x20;
* inOriginalDisc3 – Current discount 3 given by MSS;&#x20;
* inOriginalDisc4 – Current discount 4 given by MSS;&#x20;
* inDCLACL7\_11 – Price and discounts codes concatenated by Character 7;&#x20;
* inPriceFactor – Multiplier factor for the price (loaded from units table MSUND, field UNDFCT);
* inQtyFactor – Multiplier factor for the quantity (loaded from units table MSUND, field UNDFQT);
* inLineType – Code of line type (N – Normal, D – Return, … check MSS documentation for full list);
* inDCLMTD – Delivery motive code; inDCLSTM – Stock movement (1 – Normal / 2 – Unsaleable / 0 – Doesn’t move stock);&#x20;
* inLength – Length of the article (DCLCMP);&#x20;
* inWidth – Width of the article (DCLLGR);&#x20;
* inHeight – Height of the article (DCLALT);&#x20;
* inWeight – Unit weight of the article (DCLPES);&#x20;
* inTotalWeight – Total weight of the article (DCLPET);&#x20;
* inMaxQty – To validate Max Qty, for example, credit notes can’t add quantity greater than the origin invoice;&#x20;
* inOnlyDevol – To force the type of line to Only Return;&#x20;
* inCanChangeOnlyQty – To allow only the change of the quantity, line type, prices and discount can’t be changed;&#x20;
* inControlToFocus – Which control should have the focus: P – Price / Q – Quantity / D1 – Discount 1 / D2 – Discount 2 / D3 – Discount 3 / D4 – Discount 4 / if empty will assume Q;&#x20;
* inTypesToDisable – Disable line types, the codes of line type will be concatenated, for example “OB” will disable Bonus and Offer line types;

*Output parameters:*&#x20;

* outResultCode – Return code: 1 – OK / 0 – Cancel;&#x20;
* outprice – Price;&#x20;
* outDiscount1 – Discount 1;
* outDiscount2 – Discount 2;&#x20;
* outDiscount3 – Discount 3;&#x20;
* outDiscount4 – Discount 4;&#x20;
* outLineType – Line type selected;&#x20;
* outUnit – Unit selected;&#x20;
* outPriceFactor – Price factor;&#x20;
* outQtyFactor – Quantity factor;&#x20;
* outQty – Quantity;&#x20;
* outLength – Length of the article;&#x20;
* outWidth – Width of the article;&#x20;
* outHeight – Height of the article;&#x20;
* outWeight – Weight of the article;&#x20;
* outTotalWeight – Total weight of the article;&#x20;
* outDCLMTD – Delivery motive code;&#x20;
* outDCLSTM - Stock movement;&#x20;
* inOriginalPrice – Original price given by MSS;&#x20;
* inOriginalDisc1 – Original discount 1 given by MSS;&#x20;
* inOriginalDisc2 – Current discount 2 given by MSS;&#x20;
* inOriginalDisc3 – Current discount 3 given by MSS;&#x20;
* inOriginalDisc4 – Current discount 4 given by MSS;&#x20;
* outLastCount – Last count used when article type is counter;&#x20;
* outActualCount – Actual count used when article type is counter;&#x20;
* outDCLACL\_7\_11 – Price and discounts codes concatenated by Character 7;&#x20;
* outOpenMSSModule – Return code: 1 – Open MSS quantity screen / 0 – Don’t open MSS quantity screen;&#x20;
