Sales order not reflecting in pending so

Discussion in 'Free Source Codes' started by Reshma, Aug 11, 2020.

    
  1. Reshma

    Reshma Member


    Dear Experts,

    I am creating auto Sales order after saving Stock journal. The SO is getting generated but not reflecting in pending so ledger wise report. Please help .


    [Function:AutoDAMSO]
    ;;; Function - at the time of Dealer Damage Journal with class as Transfer Out
    Variable:NUM:Number
    ; Variable:Vchnum:String
    ; 00:Set:Vchnum:
    Local Formula : LocalFrml1 : "DMSO/";$MyPrefix:VoucherType:"Sales Order Dealer Damage"
    Local Formula : LocalFrml2 : ($$NumItems:SOVchsColl+1)
    Local Formula : LocalFrml3 :"/20-21"; $MYsufix:VoucherType:"Journal"
    Local Formula : VchNumFrml : @LocalFrml1+($$String:mad:LocalFrml2)+@LocalFrml3
    01:START PROGRESS:($$NumItems:DDAutoSOColl):"Generating Voucher":mad:@CmpMailName:"Generating Auto Sales order..."
    02:WALK COLLECTION:DDAutoSOColl
    02A:Set:Num:$$NumItems:SOVchsColl+1
    03 : SET : SVViewName : $$SysName:InvVchView
    04 : NEW OBJECT : Voucher
    05 : SET VALUE : Date :$$Date:##VARVchDate
    06 : Set Value : PARTYLedgername : $DMP
    07 : SET VALUE : VoucherTypeName : "Sales Order Dealer Damage"
    08 : SET VALUE : IsInvoice : Yes
    09 : SET VALUE : PERSISTEDVIEW : ##SVViewName
    10 : SET VALUE : VoucherNumber :mad:LocalFrml1+($$String:##Num)+@LocalFrml3;;$$NumItems:SOVchsColl+1;;##Vchnum
    11 : SET VALUE : PartyLedgerName : $DMP
    11A :Set Value :reference :mad:LocalFrml1+($$String:##Num)+@LocalFrml3
    12: Set Value :IsCancelled:No

    ; 35:Log:$reference

    13 : INSERT COLLECTION OBJECT : Ledger Entries
    13A:Set Target:ledgerentries
    14 : SET VALUE : Ledger Name : $DMP
    ; 15 : SET VALUE : Amount : 0
    ;If Not $$Isdr:mad:@Roundamt and @@Roundamt<=$$AsAmount:0.50 then ($$AsAmount:$Amt)+($$Round:mad:@OPC:1)+@@GST1+@@GST1+$$Abs:mad:@Roundamt else($$AsAmount:$Amt)+($$Round:mad:@OPC:1)+@@GST1+@@GST1+@@Roundamt1
    15 : SET VALUE : ISDEEMEDPOSITIVE : Yes
    16 : Set Value : ISPARTYLEDGER : Yes
    16A:Set Value:Ledgerfromitem:No
    17 : Set Value : ISLASTDEEMEDPOSITIVE : Yes
    18 : SET TARGET : ..

    19:Walk Collection:DDAutoSOCollDetails
    20 : Insert Collection Object : INVENTORYENTRIES
    20A:Set Target:INVENTORYENTRIES
    21 : Set Value : STOCKITEMNAME :$DMItem
    21A : Set Value :DMOItem :$DMitemori
    22 : Set Value : ISDEEMEDPOSITIVE : No
    22A : Set Value :Isautonegate :Yes
    23 : Set Value : ACTUALQTY : ($$AsQty:$DMQT)*-1
    24 : Set Value : BILLEDQTY : ($$AsQty:$DMQT)*-1

    25 : Insert Collection Object : BATCHALLOCATIONS
    26 : Set Value : GODOWNNAME : "Store"
    ;846 : Set Value : AMOUNT : $Amt;($$AsAmount:$Amt)
    26A : Set Value :VCHDMItem :$DMitemori
    26B:Set Value:DESTINATIONGODOWNNAME:"Store"
    27 : Set Value : ACTUALQTY : ($$AsQty:$DMQT)*-1
    28 : Set Value : BILLEDQTY : ($$AsQty:$DMQT)*-1
    ;848A : Set Value : RATE : $AMt/$BQ
    28AA:Set Value:Orderno:mad:LocalFrml1+($$String:##Num)+@LocalFrml3
    28A:Set Value:ORDERDUEDATE:$$DateRange:($$Date:##VARVchDate):($$Date:##VARVchDate):True

    29: Set Target:..

    30 : Insert Collection Object : ACCOUNTINGALLOCATIONS
    30A:Set Target:Ledgerentries
    31 : Set Value : LEDGERNAME : "Sales GST"
    32 : Set Value : ISDEEMEDPOSITIVE :No
    32A : Set Value :ISLASTDEEMEDPOSITIVE :No
    32B : Set Value :Ispartyledger :No
    ;1020: Set Value : AMOUNT :$AMT;-(($$CollAmtTotal:CHCOLLGST:$GSTAMT)+($$CollAmtTotal:CHCOLLGST:$GSTAMT1)*-1)
    33: Set Target : ...
    33A:Set Target:...
    34:End Walk
    36:Create Target
    36A:Set:Num:0
    37:END WALK
    38:Display:daybook
    39:RETURN
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Have u tried Ctrl+Alt+R ... or restarting Tally??
     


  3. Reshma

    Reshma Member


    When I resave these vouchers, then they get reflected.
     


  4. Reshma

    Reshma Member


    Please check, is any tag missing by me, or is there any other way to generate Sales order as if i change voucher type to Sales then it is properly reflecting but for Sales Order there is an issue.
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    After END WALK .... try putting .......... SAVE TARGET
     


  6. Reshma

    Reshma Member


    Still not working
     


  7. Reshma

    Reshma Member


    Please guide.
     


  8. mailamitgoyl

    mailamitgoyl New Member


    in actual/billed qty try "$$Negative:$$AsOutQty:$$asQty:"
     


Share This Page