`FREE CODE - IMPORT PURCHASE WITH BATCH,WITH INVENTORY

Discussion in 'Free Source Codes' started by rajendra mithari, Mar 17, 2016.

    

  1. DEAR ALL, AFTER MANY PRACTICE I DONE IMPORT PURCHASE WITH STOCK ITEM WITH BATCH ALLOCATION AND IN INVOICE MODE.

    JUST CHANGE $$FileReadCell:##Counter:1
    ##COUNTER:1 MEANS FIRST COLUMN WHATEVER ROW NUMBER

    ITS SUCCESS , JUST TELL ME WHY STOCK IMPACT IS NEGETIVE SAVED ?
    WHAT IS LOGIC OF ISDEEMEDPOSITIVE ?

    PL SLOVE MY QUERY.

    ;
    ;;---------------- PURCHASE IMPORT-------------------

    [Report: purchaseimport]

    [Form: purchaseimport]

    Part : purchaseimport
    Back ground : @@SV_RELEASEDBLUE
    On : Form Accept : Yes : Form Accept
    On : Form Accept : Yes : Call : purchaseimportfunc

    [Part: purchaseimport]

    Line : purchaseimportln1, purchaseimportln2 ;, cashgl

    [Line: purchaseimportln1]

    Field : Long Prompt,purchaseimportfld1
    Local : Field : Long Prompt : Set As : "Enter File Name (eg:D:\File1.xlsx) :"

    [Line: purchaseimportln2]
    Field:long prompt,purchaseimportfld2
    Local:Field:long prompt:Set as:"Select Voucher type Name (Purchase)"

    [Field: purchaseimportfld1]
    Use : Name Field
    Modifies : purchaseimportvar1
    Full width : Yes
    Max : 100
    [Field:purchaseimportfld2]
    Use:name field
    Table : ExtractVoucher Type
    Show Table : On Blank
    Modifies:purchaseimportvar2
    Full Width:Yes
    max: 100
    [Variable: purchaseimportvar1]
    Type : String
    [Variable:purchaseimportvar2]
    Type:String
    [system : Variable]
    purchaseimportvar1 :""
    purchaseimportvar2:""

    ;;-----------------------------------------------

    [Function: purchaseimportfunc]
    Variable : Counter : Number : 2

    1000 : OPEN FILE : ##purchaseimportvar1 : Excel : Read
    1010 : WHILE : NOT $$IsEmpty:($$FileReadCell:##Counter:1)
    1011: Set file Log On
    1012: Log:$vouchernumber

    40 : NEW OBJECT : Voucher
    30 : SET : SVViewName : $$SysName:InvVchView
    60 : SET VALUE : VoucherTypeName : ##purchaseimportvar2
    50 : SET VALUE : Date : $$Date:(($$StringPart:($$FileReadCell:##Counter:4):0:2 +"/"+ $$StringPart:($$FileReadCell:##Counter:4):2:2 + "/"+$$StringPart:($$FileReadCell:##Counter:4):4:4))
    90 : SET VALUE : VoucherNumber :$$FileReadCell:##Counter:13 + "/"
    100 : SET VALUE : PartyLedgerName : $$String:mad:@partynm
    101 : SET VALUE : PartyName : $$String:mad:@partynm
    110 : SET VALUE : IsInvoice : Yes
    111 : Set Value: amount:$$AsAmount:$$FileReadCell:##Counter:7
    112 : Set Value: REFERENCE :$$FileReadCell:##Counter:5
    113 : Set Value: ReferenceDate:$$Date:$$FileReadCell:##Counter:4
    114 : Set Value: CSTFORMISSUETYPE:"c form"

    130 : INSERT COLLECTION OBJECT : LEDGERENTRIES
    140 : SET VALUE : LedgerName : $$String:mad:@partynm
    150 : SET VALUE : IsDeemedPositive : No
    151 : SET VALUE : IsPartyLedger : Yes
    160 : SET VALUE : Amount : $$AsAmount:$$FileReadCell:##Counter:7
    170 : SET TARGET : ..

    130a : INSERT COLLECTION OBJECT : LEDGERENTRIES
    140a : SET VALUE : LedgerName : $$String:mad:@purgl
    170a : SET TARGET : ..

    180 : INSERT COLLECTION OBJECT : INVENTORYENTRIES
    190 : SET VALUE : StockItemName : $$FileReadCell:##Counter:24
    210 : SET VALUE : ActualQty : ($$TgtObject:($$AsQty:"-1"))
    220 : SET VALUE : BilledQty : ($$TgtObject:($$AsQty:"-1"))
    230 : SET VALUE : Rate : ($$TgtObject:($$AsRate:$$FileReadCell:##Counter:7))
    240 : SET VALUE : Amount : $$AsAmount:$$FileReadCell:##Counter:7

    250 : INSERT COLLECTION OBJECT : BATCHALLOCATIONS
    260 : SET VALUE : GodownName : "stockyard"
    270 : SET VALUE : BatchName : $$FileReadCell:##Counter:11
    280 : SET VALUE : ActualQty : ($$TgtObject:($$AsQty:"-1"))
    290 : SET VALUE : BilledQty :($$TgtObject:($$AsQty:"-1"))
    300 : SET VALUE : Rate : ($$TgtObject:($$AsRate:$$FileReadCell:##Counter:7))
    310 : SET VALUE : Amount : $$FileReadCell:##Counter:7
    320 : SET TARGET : ..

    330 : INSERT COLLECTION OBJECT : ACCOUNTING ALLOCATIONS
    340 : SET VALUE : LedgerName : $$String:mad:@purgl
    360 : SET VALUE : Amount : $$AsAmount:$$FileReadCell:##Counter:7
    361 : Set Value: IsDeemedPositive : Yes
    370 : SET TARGET : ..

    1255 : Set Value : Narration:$$FileReadCell:##Counter:12
    ;1255A : Set Value:ENGNOPURCHASE:$$FileReadCell:##Counter:12
    1256a: SET VALUE : PersistedView : ##SVViewName
    1256 : Create Target
    1257 : INCREMENT : Counter
    1257b: Set File Log Off
    1257c: Log:$vouchernumber

    1258 : END WHILE
    1259 : CLOSE FILE

    410 : MSGBOX : "Status" : "Created Purchase Voucher"
    440 : RETURN



    [System:formula]
    myvchno:($$FileReadCell:##Counter:2) + $$FileReadCell:##Counter:1
    partynm :"Hyundai Motors India LTD "+$$FileReadCell:##Counter:8
    purgl:$$FileReadCell:##Counter:8 + " purchases"
    bilqty:$$AsQty:$$FileReadCell:##Counter:25
    VCHNO:$$FileReadCell:##Counter:13 +"/"+ $$String:($$FileReadCell:##Counter:2)
     


  2. Joharfchhil

    Joharfchhil Member


    Iam also getting same all in Minus (-) can anybody help us to set it right, thanks a lot.
     


  3. Murali.R

    Murali.R Member


    Please upload your excell sheet
     



  4. pl send ur mail id
    excel file is being uploaded here
     


  5. Joharfchhil

    Joharfchhil Member



  6. nsrao-Vijayawada

    nsrao-Vijayawada New Member



  7. Murali.R

    Murali.R Member



  8. Sanjjaypal

    Sanjjaypal New Member


    Upload your excel sheet
     



  9. pl send ur mail id, the excel file is not uploading here.
    even till date above four peoples get my excle file by meil
     


  10. mahgs

    mahgs Member




  11. TILL NOW I HAVE SEND EXCEL SHEET 6 MEMBERS
    PL ANYBODY HELP ME
     


  12. Sanjeev S

    Sanjeev S Active Member



  13. ldharjani

    ldharjani New Member



  14. manikandancmk

    manikandancmk New Member



  15. Sanjjaypal

    Sanjjaypal New Member


    Upload your excell sheet
    sanjaypalsjp@gmail.com
     


  16. Yogender

    Yogender Member



  17. psjain_jal

    psjain_jal Member



  18. K V Shah

    K V Shah New Member



  19. AshishPatel

    AshishPatel New Member



  20. sattam

    sattam Active Member



  21. Ranjith ck

    Ranjith ck New Member

    akash7474 likes this.


  22. B Patil

    B Patil New Member


    Dear Rajendra,

    When any account is to be debited, "ISDEEMEDPOSITIVE" to to be Set to "YES" and the amount should be Negative
    and vice a versa.

    While we are making Purchase Entry ,

    Supplier is being credited. Hence in the Ledger Entries Block, ISDEEMEDPOSITIVE is set to NO and amount is > 0
    Purchase A/c. Gets Debited Hence in the Ledger Entries Block, ISDEEMEDPOSITIVE is set to Yes and amount is < 0

    Hope this will help you in solving the problem
    Good Luck.
     



  23. THANKS SIR, I UNDERSTAND.
     


  24. Shailendra sahu

    Shailendra sahu New Member



  25. asit kant

    asit kant New Member



Share This Page