Sale Voucher import from Excel

Discussion in 'Free Source Codes' started by AMIT JALAN, Jun 21, 2020.

         
  1. AMIT JALAN

    AMIT JALAN New Member


    Hi,

    I am facing issue in this function. Inventory details is not capturing and error comes with difference of inventory amount.

    Please help.

    [Function : CreateVoucher]
    50 : New Object : VOUCHER
    60 : Set Value : DATE : $$FileReadCell:##runningrow:2
    61 : Set Value : PARTYLEDGERNAME : $$FileReadCell:##runningRow:3
    70 : Set Value : VOUCHER TYPENAME : "Sales"
    70a : Set Value : ChangeVchMode : No
    71 : Set Value : PERSISTEDVIEW : "Invoice Voucher View"
    72 : Set Value : ISINVOICE : "Yes"
    73 : Set Value : ISVATDUTYPAID : "Yes"

    1100 : Insert Collection Object : Inventory Entries
    1110 : Set Value : STOCKITEMNAME : "Item"
    1111 : Set Value : ISDEEMEDPOSITIVE : No
    1112 : Set Value : AMOUNT : 1000
    1200 : Insert Collection Object : Accounting Allocations
    1201 : Set Value : LEDGERNAME : "Sale"
    1202 : Set Value : ISDEEMEDPOSITIVE : No
    1203 : Set Value : Amount : 1000
    1220 : Set Target : ..
    1230 : Set Target : ..


    110 : Insert Collection Object : LEDGER ENTRIES
    120 : Set Value : LEDGER NAME : $$FileReadCell:##runningrow:3
    130 : Set Value : IS DEEMED POSITIVE : Yes
    131 : Set Value : ISPARTYLEDGER : Yes
    140 : Set Value : AMOUNT : $$Negative:1000
    141 : Set Target : ..

    11000 : Create Target
     


  2. Neeru

    Neeru Member


    Share error pic..
     


  3. AMIT JALAN

    AMIT JALAN New Member


    Hi Neeru,

    Please find below the screenshot of error I am getting. What I observed that this function only add Ledger details but not Item details.
     

    Attached Files:



  4. Neeru

    Neeru Member


    Share excel and Full Code, My mail id is suppor47team@gmail.com
     


  5. AMIT JALAN

    AMIT JALAN New Member


    Hi,
    Now, I got the error. To insert inventory Details, I Used:

    1100 : Insert Collection Object : Inventory Entries
    1110 : Set Value : STOCKITEMNAME : "Item"
    1111 : Set Value : ISDEEMEDPOSITIVE : No
    1112 : Set Value : AMOUNT : 1000
    1200 : Insert Collection Object : Accounting Allocations
    1201 : Set Value : LEDGERNAME : "Sale"
    1202 : Set Value : ISDEEMEDPOSITIVE : No
    1203 : Set Value : Amount : 1000

    Correct code I found to be:
    1100 : Insert Collection Object : Ledger Entries
    1201 : Set Value : LEDGERNAME : "Sale"
    1202 : Set Value : ISDEEMEDPOSITIVE : No
    1203 : Set Value : Amount : 1000
    1200 : Insert Collection Object : Inventory Allocations
    1110 : Set Value : STOCKITEMNAME : "Item"
    1111 : Set Value : ISDEEMEDPOSITIVE : No
    1112 : Set Value : AMOUNT : 1000

    Now, I am successfully able to create vouchers with inventory details.
     
    Amit Kamdar likes this.


Share This Page