Issue On Billalocation

Discussion in 'Requests' started by Systecg, Mar 5, 2021.

    
  1. Systecg

    Systecg Member


    In Sales
    Bill Allocation working but also going on account Double amount of invoice in excel totally.

    how to stop on account amount.
    ;;codestart
    [Function:Vch Import Sales]
    Variables:Roundoff : Number
    Local Formula:AbsRound : $$Abs:$$Number:##Roundoff
    Action:S0 : Set : ProgressCounter :$$NumItems:MyExcelColl
    Action:S1 : Call : GSTLedger Auto Creation
    Action:000 : Start Progress : ($$NumItems:MyExcelColl): "Excel Sales Import":"Sales in Progress...."
    Action:1000 : Walk Collection : MyExcelColl
    Action:1 : New Object : Voucher
    Action:2 : SET : SvViewName : $$SysName:AcctgVchView
    Action:3 : Set Value : PersistedView : $$SysName:AcctgVchView
    Action:4 : Set Value : IsInvoice : Yes
    Action:5 : Set Value : VoucherTypeName : $Column35
    Action:pRO000 : Show Progress : $$LoopIndex:($$Sprintf:"Importing %s of %s":$$LoopIndex:##ProgressCounter)
    Action:6 : Set Value : VOUCHERNUMBER : $Column1
    Action:7 : Set Value : PARTYLEDGERNAME : $Column4
    Action:8 : Set Value : Date : $Column2
    Action:9 : Insert Collection Object : Ledger Entries
    Action:10 : Set Value : LedgerName : $Column4
    Action:11 : Set Value : ISDEEMEDPOSITIVE : Yes
    Action:12 : Set Value : Amount : $$AsAmount:$Column34
    Action:Z12: Set : Roundoff : $$Number:$Column34

    Action:Z9A : Insert Collection Object : BILLALLOCATIONS
    Action:Z9B : Set Value : NAME : $$Number:3
    Action:Z9C : Set Value : BILLTYPE : "New Ref"
    Action:Z9D : Set Value : ISDEEMEDPOSITIVE : Yes
    Action:Z9E : Set Value : AMOUNT :$$AsAmount:$Column34


    Action:13 : Set Target: ....
    Action:14 : If : Not $$IsEmpty:$Column5
    Action:15 : Insert Collection Object : Ledger Entries
    Action:16 : Set Value : LedgerName : ##VarSAlesZero
    Action:17 : Set Value : ISDEEMEDPOSITIVE : No
    Action:18 : Set Value : Amount : $$AsAmount:$Column5
    Action:Z18 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column5
    Action:19 : Set Target : ..
    Action:20 : End If
    Action:21 : If : Not $$IsEmpty:$Column6
    Action:22 : Insert Collection Object : Ledger Entries
    Action:23 : Set Value : LedgerName : ##VarSales5
    Action:24 : Set Value : ISDEEMEDPOSITIVE : No
    Action:25 : Set Value : Amount : $$AsAmount:$Column6
    Action:Z26 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column6
    Action:26 : Set Target : ..
    Action:27 : End If
    Action:28 : If : Not $$IsEmpty:$Column7
    Action:29 : Insert Collection Object : Ledger Entries
    Action:30 : Set Value : LedgerName : ##VarSGST5
    Action:31 : Set Value : ISDEEMEDPOSITIVE : No
    Action:32 : Set Value : Amount : $$AsAmount:$Column7
    Action:Z92 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column7
    Action:33 : Set Target : ..
    Action:34 : End If
    Action:35 : If : Not $$IsEmpty:$Column8
    Action:36 : Insert Collection Object : Ledger Entries
    Action:37 : Set Value : LedgerName : ##VarCGST5
    Action:38 : Set Value : ISDEEMEDPOSITIVE : No
    Action:39 : Set Value : Amount : $$AsAmount:$Column8
    Action:Z93 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column8
    Action:40 : Set Target : ..
    Action:41 : End If
    Action:42 : If : Not $$IsEmpty:$Column9
    Action:43 : Insert Collection Object : Ledger Entries
    Action:44 : Set Value : LedgerName : ##VarCess1
    Action:45 : Set Value : ISDEEMEDPOSITIVE : No
    Action:46 : Set Value : Amount : $$AsAmount:$Column9
    Action:Z94 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column9
    Action:47 : Set Target : ..
    Action:48 : End If
    Action:49 : If : Not $$IsEmpty:$Column10
    Action:50 : Insert Collection Object : Ledger Entries
    Action:51 : Set Value : LedgerName : ##VarIGSTSales5
    Action:52 : Set Value : ISDEEMEDPOSITIVE : No
    Action:53 : Set Value : Amount : $$AsAmount:$Column10
    Action:Z53 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column10
    Action:54 : Set Target : ..
    Action:55 : End If
    Action:204 : If : Not $$IsEmpty:$Column11
    Action:205 : Insert Collection Object : Ledger Entries
    Action:206 : Set Value : LedgerName : ##VarIGST5
    Action:207 : Set Value : ISDEEMEDPOSITIVE : No
    Action:208 : Set Value : Amount : $$AsAmount:$Column11
    Action:Z95 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column11
    Action:209 : Set Target : ..
    Action:210 : End If
    Action:211 : If : Not $$IsEmpty:$Column12
    Action:212 : Insert Collection Object : Ledger Entries
    Action:213 : Set Value : LedgerName : ##VarCess2
    Action:214 : Set Value : ISDEEMEDPOSITIVE : No
    Action:215 : Set Value : Amount : $$AsAmount:$Column12
    Action:Z96 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column12
    Action:216 : Set Target : ..
    Action:217 : End If
    Action:56 : If : Not $$IsEmpty:$Column13
    Action:57 : Insert Collection Object : Ledger Entries
    Action:58 : Set Value : LedgerName : ##VarSales12
    Action:59 : Set Value : ISDEEMEDPOSITIVE : No
    Action:60 : Set Value : Amount : $$AsAmount:$Column13
    Action:Z60 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column13
    Action:61 : Set Target : ..
    Action:62 : End If
    Action:63 : If : Not $$IsEmpty:$Column14
    Action:64 : Insert Collection Object : Ledger Entries
    Action:65 : Set Value : LedgerName : ##VarSGST12
    Action:66 : Set Value : ISDEEMEDPOSITIVE : No
    Action:67 : Set Value : Amount : $$AsAmount:$Column14
    Action:Z97 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column14
    Action:68 : Set Target : ..
    Action:69 : End If
    Action:70 : If : Not $$IsEmpty:$Column15
    Action:71 : Insert Collection Object : Ledger Entries
    Action:72 : Set Value : LedgerName : ##VarCGST12
    Action:73 : Set Value : ISDEEMEDPOSITIVE : No
    Action:74 : Set Value : Amount : $$AsAmount:$Column15
    Action:Z98 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column15
    Action:75 : Set Target : ..
    Action:76 : End If
    Action:77 : If : Not $$IsEmpty:$Column16
    Action:78 : Insert Collection Object : Ledger Entries
    Action:79 : Set Value : LedgerName : ##VarCess3
    Action:80 : Set Value : ISDEEMEDPOSITIVE : No
    Action:81 : Set Value : Amount : $$AsAmount:$Column16
    Action:Z99 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column16
    Action:82 : Set Target : ..
    Action:83 : End If
    Action:84 : If : Not $$IsEmpty:$Column17
    Action:85 : Insert Collection Object : Ledger Entries
    Action:86 : Set Value : LedgerName : ##VarIGSTSales12
    Action:87 : Set Value : ISDEEMEDPOSITIVE : No
    Action:88 : Set Value : Amount : $$AsAmount:$Column17
    Action:Z88 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column17
    Action:89 : Set Target : ..
    Action:90 : End If
    Action:91 : If : Not $$IsEmpty:$Column18
    Action:92 : Insert Collection Object : Ledger Entries
    Action:93 : Set Value : LedgerName : ##VarIGST12
    Action:94 : Set Value : ISDEEMEDPOSITIVE : No
    Action:95 : Set Value : Amount : $$AsAmount:$Column18
    Action:Z40 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column18
    Action:96 : Set Target : ..
    Action:97 : End If
    Action:98 : If : Not $$IsEmpty:$Column19
    Action:99 : Insert Collection Object : Ledger Entries
    Action:100 : Set Value : LedgerName : ##VarCess4
    Action:101 : Set Value : ISDEEMEDPOSITIVE : No
    Action:102 : Set Value : Amount : $$AsAmount:$Column19
    Action:Z41 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column19
    Action:103 : Set Target : ..
    Action:104 : End If
    Action:105 : If : Not $$IsEmpty:$Column20
    Action:106 : Insert Collection Object : Ledger Entries
    Action:107 : Set Value : LedgerName : ##VarSales18
    Action:108 : Set Value : ISDEEMEDPOSITIVE : No
    Action:109 : Set Value : Amount : $$AsAmount:$Column20
    Action:Z89 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column20
    Action:110 : Set Target : ..
    Action:111 : End If
    Action:112 : If : Not $$IsEmpty:$Column21
    Action:113 : Insert Collection Object : Ledger Entries
    Action:114 : Set Value : LedgerName : ##VarSGST18
    Action:115 : Set Value : ISDEEMEDPOSITIVE : No
    Action:116 : Set Value : Amount : $$AsAmount:$Column21
    Action:Z42 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column21
    Action:117 : Set Target : ..
    Action:118 : End If
    Action:119 : If : Not $$IsEmpty:$Column22
    Action:120 : Insert Collection Object : Ledger Entries
    Action:121 : Set Value : LedgerName : ##VarCGST18
    Action:122 : Set Value : ISDEEMEDPOSITIVE : No
    Action:123 : Set Value : Amount : $$AsAmount:$Column22
    Action:Z43 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column22
    Action:124 : Set Target : ..
    Action:125 : End If
    Action:126 : If : Not $$IsEmpty:$Column23
    Action:127 : Insert Collection Object : Ledger Entries
    Action:128 : Set Value : LedgerName : ##VarCess5
    Action:129 : Set Value : ISDEEMEDPOSITIVE : No
    Action:130 : Set Value : Amount : $$AsAmount:$Column23
    Action:Z44 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column23
    Action:131 : Set Target : ..
    Action:132 : End If
    Action:133 : If : Not $$IsEmpty:$Column24
    Action:134 : Insert Collection Object : Ledger Entries
    Action:135 : Set Value : LedgerName : ##VarIGSTSales18
    Action:136 : Set Value : ISDEEMEDPOSITIVE : No
    Action:137 : Set Value : Amount : $$AsAmount:$Column24
    Action:Z90 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column24
    Action:138 : Set Target : ..
    Action:139 : End If
    Action:140 : If : Not $$IsEmpty:$Column25
    Action:141 : Insert Collection Object : Ledger Entries
    Action:142 : Set Value : LedgerName : ##VarIGST18
    Action:143 : Set Value : ISDEEMEDPOSITIVE : No
    Action:145 : Set Value : Amount : $$AsAmount:$Column25
    Action:Z45 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column25
    Action:146 : Set Target : ..
    Action:147 : End If
    Action:148 : If : Not $$IsEmpty:$Column26
    Action:149 : Insert Collection Object : Ledger Entries
    Action:150 : Set Value : LedgerName : ##VarCess6
    Action:151 : Set Value : ISDEEMEDPOSITIVE : No
    Action:152 : Set Value : Amount : $$AsAmount:$Column26
    Action:X60 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column26
    Action:153 : Set Target : ..
    Action:154 : End If
    Action:155 : If : Not $$IsEmpty:$Column27
    Action:156 : Insert Collection Object : Ledger Entries
    Action:157 : Set Value : LedgerName : ##VarSales28
    Action:158 : Set Value : ISDEEMEDPOSITIVE : No
    Action:159 : Set Value : Amount : $$AsAmount:$Column27
    Action:Z91 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column27
    Action:160 : Set Target : ..
    Action:161 : End If
    Action:162 : If : Not $$IsEmpty:$Column28
    Action:163 : Insert Collection Object : Ledger Entries
    Action:164 : Set Value : LedgerName : ##VarSGST28
    Action:165 : Set Value : ISDEEMEDPOSITIVE : No
    Action:166 : Set Value : Amount : $$AsAmount:$Column28
    Action:Z46 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column28
    Action:167 : Set Target : ..
    Action:168 : End If
    Action:169 : If : Not $$IsEmpty:$Column29
    Action:170 : Insert Collection Object : Ledger Entries
    Action:171 : Set Value : LedgerName : ##VarCGST28
    Action:172 : Set Value : ISDEEMEDPOSITIVE : No
    Action:173 : Set Value : Amount : $$AsAmount:$Column29
    Action:Z47 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column29
    Action:174 : Set Target : ..
    Action:175 : End If
    Action:176 : If : Not $$IsEmpty:$Column30
    Action:177 : Insert Collection Object : Ledger Entries
    Action:178 : Set Value : LedgerName : ##VarCess7
    Action:179 : Set Value : ISDEEMEDPOSITIVE : No
    Action:180 : Set Value : Amount : $$AsAmount:$Column30
    Action:Z48 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column30
    Action:181 : Set Target : ..
    Action:182 : End If
    Action:183 : If : Not $$IsEmpty:$Column31
    Action:184 : Insert Collection Object : Ledger Entries
    Action:185 : Set Value : LedgerName : ##VarIGSTSales28
    Action:186 : Set Value : ISDEEMEDPOSITIVE : No
    Action:187 : Set Value : Amount : $$AsAmount:$Column31
    Action:Z52 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column31
    Action:188 : Set Target : ..
    Action:189 : End If
    Action:190 : If : Not $$IsEmpty:$Column32
    Action:191 : Insert Collection Object : Ledger Entries
    Action:192 : Set Value : LedgerName : ##VarIGST28
    Action:193 : Set Value : ISDEEMEDPOSITIVE : No
    Action:194 : Set Value : Amount : $$AsAmount:$Column32
    Action:Z49 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column32
    Action:195 : Set Target : ..
    Action:196 : End If
    Action:197 : If : Not $$IsEmpty:$Column33
    Action:198 : Insert Collection Object : Ledger Entries
    Action:199 : Set Value : LedgerName : ##VarCess8
    Action:200 : Set Value : ISDEEMEDPOSITIVE : No
    Action:201 : Set Value : Amount : $$AsAmount:$Column33
    Action:Z50 : Set : Roundoff : ##Roundoff-$$AsAmount:$Column33
    Action:220 : Set Target : ..
    Action:221 : End If
    Action:R7500 : If :( not $$IsEmpty:##Roundoff)
    Action:R7600 : Insert Collection Object : Ledger Entries
    Action:R7800 : Set Value : LedgerName : "Round Off"
    Action:R8000 : Set Value : IsDeemedPositive : No
    Action:R8200 : Set Value : Amount : if $$IsNegative:##Roundoff then $$AsAmount:mad:AbsRound * -1 else $$AsAmount:mad:AbsRound
    Action:R8201 : SET vALUE : Reference : $Column1

    ggfgffgfgfg7:Log:$$TgtObject:$AMOUNT


    Action:R8400 : Set Target : ..
    Action:R8600 : End If
    Action:R8601 : Set Value : Narration : $Column38 ;PartyGSTIN

    ;;TP


    Action:5000 : Create Target
    Action:5049 : End Walk
    Action:pRO001 : End Progress
    Action:SA610 : MSGBOX : "Status" : "Created Sales \n Voucher(s) !!"
    Action:SA630 : Set File Log On
    Action:SA640 : RETURN





    ;;code end



    upload_2021-3-5_20-6-45.png






    upload_2021-3-5_20-5-4.png
     


Share This Page