Help needed for POS Printing single item in 2 lines

Discussion in 'Requests' started by SanketPorwal, Aug 23, 2021.

    
  1. SanketPorwal

    SanketPorwal New Member


    Hello,
    I have written a code to print Sl, Name of Product, HSN on first line of the POS Invoice and rest of all the details in second line. There are two problems with the code.
    1. All second line details are getting printed twice (Attachment: Issue.png)
    2. When same item appears twice in the invoice, then rest of the details get printed twice (As shown in attachment "Issue2.png"). Once the amount is 38 and 2nd is 40

    Can any of the senior members help these two issues.
    Code :
    [!Line : MGPOSInvDetails]

    Local:Field:pOS InvDesc:Line:2
    Delete : Field
    Delete : Right Field
    ;Delete : Explode

    Add : Fields : POS SLNo, POS InvDesc
    Add : Explode : MGPOSInvDetailsExp : Yes


    [Part : MGPOSInvDetailsExp]

    Line : MGPOSInvDetailsExp
    Repeat : MGPOSInvDetailsExp:MGPOSInvColl;InventoryEntries
    Print BG : Red
    [Line : MGPOSInvDetailsExp]
    Right Fields: POS InvDesc, POS GSTInvHSN, POS InvQty, POS RateIncl, POS InvRate, POS InvDisc, POS InvAmount, POS InvFreeItem
    Local:Field:pOSInvDesc:Invisible:True
    Remove if : $$IsSysName:$StockItemName


    [Collection : MGPOSInvColl]
    Source Collection : Default
    Walk : AllInventoryEntries
    Compute : StockItemName : $StockItemName
    Compute : BilledQty : $BilledQty
    Compute : ActualQty : $ActualQty
    Compute : InclusiveTaxValue: $InclusiveTaxValue
    Compute : Rate : $Rate
    Compute : Amount : $Amount
    Compute : GSTItemHSNCodeEx : $GSTItemHSNCodeEx
    Filter : IsChildOfParentItem

    [System : Formula]
    IsChildOfParentItem : $$Owner:$StockItemName = $StockItemName And ($$Owner:$BilledQty = $BilledQty OR $$Owner:$ActualQty = $ActualQty) ;And $$Owner:$$Line = $$line
     

    Attached Files:



Share This Page