how to insert own form values into specific voucher type only

Discussion in 'Free Source Codes' started by mayur sancheti12, Apr 21, 2022.

    

  1. hi everyone,
    need small help , to save own form voucher values .
    i have written below function,

    Code:
    [Function: Function Create]
      
        30    : NEW OBJECT : VOUCHER
        40    : SET : SVViewName      : $$SysName:AcctgVchView
        50    : SET : SVVoucherType : $$VchTypeReceipt
        60    :   SET VALUE    : Date                        : $Date
        70    :   SET VALUE    : VoucherTypeName            : $$VchTypeReceipt
        75  :    SET VALUE   : SalesMasterID             : ($CmpVchID:Company:##SVCurrentCompany)
        76 :  log : $$TgtObject:$SalesMasterID
        80    :         INSERT COLLECTION OBJECT                : AllLedgerEntries
        90    :        SET VALUE        : LedgerName            : $Partyledgername
        100    :         SET VALUE        : Amount                : $$AsAmount:100;$Amount
        110    :         SET VALUE        : Is Deemed Positive    : "No"
        120    :         INSERT COLLECTION OBJECT                : BillAllocations
        130    :        SET VALUE        : Name                    : $BillName1
        140    :      SET VALUE         : BillType                : "AgstRef"
        150    :         SET VALUE        : Amount                : $$AsAmount:100*-1;$BillAmt1
        160    :         SET TARGET        : ...
        170    :      INSERT COLLECTION OBJECT                : AllLedgerEntries
        180    :        SET VALUE        : LedgerName            : "Cash"
        190    :         SET VALUE        : Amount                : $$AsAmount:100;$amount
        200    :         SET VALUE        : Is Deemed Positive    : "Yes"
        210    :         SET TARGET        : ..
        220 :  SET VALUE: Persisted View: ##SVViewName
        221 : CREATE TARGET
        240 : MSG BOX : "Info" : "Receipt Voucher Created"
    which is insert form values into receipt voucher type. i need to SAVE complete form to "LORRY RECEIPT" voucher .
    all other voucher should not change.
     


Share This Page