help on Problem with Gathering Collection from excel data.

Discussion in 'Requests' started by zakirhossain_diu, Mar 19, 2020.

    

  1. Dear Experts,
    I am trying to import a physical stock voucher, each time I am getting log as voucher number 1 already existed.
    anybody can advise me to gather collection that can import data. Should I write another collection?

    Used collection in different ways but the same log. one of them are as below:

    [Collection:physicalStockdata]
    Source Collection:physicalstock ODBC data
    by: VchNo:$excelInveNo
    compute: stkItem:$excelItemName
    Aggr Compute:vchqty:Sum:$excelqty
    Fetch:?

    followings are data Table:
    Item --- Qty --- vch no
    Item A -- 200-- 1
    Item B -- 15-- 1

    Thank you
     


  2. balajimg

    balajimg Active Member


    in voucher type masters
    change the type of numbering as Manual
     



  3. Dear Sir,
    I used the following functions, after change in voucher numbering, it's getting one item only.

    Code:
        2020 : WALK COLLECTION : SalesvchImpVoucherDetailsz
       
        2021: Set:PurProductName:$khadimcustomer   
        2030: Set:ItQty:$khadimacccode
    
        2050    :     NEW OBJECT        : Voucher
        2060    :     SET VALUE        : VoucherTypeName    : "Physical Stock"
        2070  :     SET VALUE        : Narration            : "Narration"   
        2080  :     SET VALUE        : VoucherNumber        : $khadiminvNo
        3000    :     SET VALUE        : Date                 : $$Date:$khadimdate ;@@EVchDatePost ;$$Date:"20190401"
        3020    :     SET VALUE        : IsInvoice            : Yes
        3021    :     Set Value        :DIFFACTUALQTY        : Yes
       
    
        6090    :     INSERT COLLECTION OBJECT        : INVENTORYENTRIES
        7000: Set Target: INVENTORYENTRIES
        7010    :         SET VALUE    : StockItemName        : $khadimcustomer ;##PurProductName
        7020    :         SET VALUE    : IsDeemedPositive    : Yes
        7021    :         SET VALUE    :ISLASTDEEMEDPOSITIVE: Yes    
        7060    :         SET VALUE    : ActualQty            : $$TgtObject:($$AsQty:##ITqty)
       
    
    
        8010    :         INSERT COLLECTION OBJECT        : BATCHALLOCATIONS
        8020    :             SET VALUE    : GodownName        : "Main Location"
        8030    :             SET VALUE    : BatchName            : "Primary Batch"   
    
        8070    :             SET VALUE    : ActualQty            :  $$TgtObject:($$AsQty:##ITqty)
       
    ;    9050    :         SET TARGET    : ...
        9060    :         SET TARGET    : ...
               
    ;    9070    : END WALK
    
        9080    :   SET VALUE   : PersistedView     : ##SVViewName
        9090    :     Save TARGET
    ;    10000    : END WALK
    
       
    149 : INCREMENT   : Counter
    150 : SHOW PROGRESS : ##Counter
    152 : END WALK
    153 : END PROGRESS
    10010    : RETURN    
     


  4. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Are you serious ?
    even function index is not in order ...

    Code:
      2020 : WALK COLLECTION : SalesvchImpVoucherDetailsz
     
        2021: Set:PurProductName:$khadimcustomer 
        2030: Set:ItQty:$khadimacccode
    
        2050    :     NEW OBJECT        : Voucher
        2060    :     SET VALUE        : VoucherTypeName    : "Physical Stock"
        2070  :     SET VALUE        : Narration            : "Narration" 
        2080  :     SET VALUE        : VoucherNumber        : $khadiminvNo
        3000    :     SET VALUE        : Date                 : $$Date:$khadimdate ;@@EVchDatePost ;$$Date:"20190401"
        3020    :     SET VALUE        : IsInvoice            : Yes
        3021    :     Set Value        :DIFFACTUALQTY        : Yes
     
    
        6090    :     INSERT COLLECTION OBJECT        : INVENTORYENTRIES
        7000    :       Set Target: INVENTORYENTRIES
        7010    :         SET VALUE    : StockItemName        : $khadimcustomer ;##PurProductName
        7020    :         SET VALUE    : IsDeemedPositive    : Yes
        7021    :         SET VALUE    :ISLASTDEEMEDPOSITIVE: Yes  
        7060    :         SET VALUE    : ActualQty            : $$TgtObject:($$AsQty:##ITqty)
     
    
    
        8010    :         INSERT COLLECTION OBJECT        : BATCHALLOCATIONS
        8020    :             SET VALUE    : GodownName        : "Main Location"
        8030    :             SET VALUE    : BatchName            : "Primary Batch" 
    
        8070    :             SET VALUE    : ActualQty            :  $$TgtObject:($$AsQty:##ITqty)
     
       9050    :         SET TARGET    : .. ; BATCH ALLOCATION END HERE
    
       9070    :      SET TARGET    : ..  ;INVENTORY ENDS HERE
        9080    :   SET VALUE   : PersistedView     : ##SVViewName ; WHERE IS THIS VARIABLE DEFINED
        9090    :     Save TARGET
    
    10149 : INCREMENT   : Counter
    10150 : SHOW PROGRESS : ##Counter
    10152 : END WALK
    10153 : END PROGRESS
    10210    : RETURN 
    
     


Share This Page