Help to customise the Sales Order form like the Invoice form

Discussion in 'Requests' started by sk.mahendran, Feb 9, 2014.

    
  1. sk.mahendran

    sk.mahendran New Member


    Having the customised Invoice format.
    Now want to use the sales order form like the Customised Invoice format.
    How to activate the Sales order form, because All the Discount Columns and the Packing, Charity and Insurance Columns are blocked in the sales order.
    How to create a new sales order form just like the Invoice form.
    Please help me. invoice.jpg sales order.jpg
     


  2. Raju Das

    Raju Das Member





    Upload your TDL code please
     


  3. sk.mahendran

    sk.mahendran New Member


    Sir,
    I need the form variable for the sales order ( Eg. for invoices it is : #form = export invoice) likewise what is the form controller for the sales order in tally.

    Enclosing the TDL code :

    ;;========================================================== INVOICE CONFIGURAITON =============================================================================
    [#Field: Plain VCH Date]
    Set as : $$MachineDate ;;##VARVchDate

    [#Form: Export Invoice]
    Delete : Bottom Button : Optional Button, PostDated Button, ;;SVAcctsInvoice, InvoiceButton
    Set: SVAcctsInvoice : No

    [#Form: EI Supplementary]
    Delete: Part : EI PartyDetails

    [#Part: DBLLINE Narration]
    Delete: Line : VCH ShowStatutoryDetails

    [#Field: CST FormTypeRecd]
    Use: Name Field
    Storage: CSTFormRecvType
    Table: CSTFormTypes, CST DFormType, Not Applicable : $$IsSales:##SVVoucherType OR $$IsCreditNote:##SVVoucherType
    Table: CST E FormTypes, Not Applicable : $$IsPurchase:##SVVoucherType OR $$IsDebitNote:##SVVoucherType
    Show Table: Always
    Width: 13
    Inactive: NOT @@IsCSTVoucher
    Set Always: Yes
    Set As: if #SVClass Containing "CST @ 2%" then "C Form" else ""

    [#Form: EI Supplementary]
    Delete: Parts : EI OrderTitle, EI Orders

    [#Line: EI Challan No Title]
    Local : Field : Medium Prompt : Set as : if @@IsSales then $$LocaleString:"Bundle No(s) :" else if (@@IsCreditNote OR @@IsDebitNote) then $$LocaleString:"Tracking No(s) :" else ($$LocaleString:"Receipt Note No." +"(s):")

    [#Field: EI ShipDate]
    Inactive: $$IsSysName:$BasicShipDeliveryNote OR @@IsSales

    [#Part: EI DelNoteInfo]
    Add: Line : lnDocThru
    Add: Line : lnDocBank
    Add: Line : After : EI PortDestination : lnRemark , lnCExNo
    Delete: Line : EI ShipDetails
    Height: 10
    Repeat: lnDocBank : BasicOrderTerms
    Break on : $$IsEmpty:$BasicOrderTerms
    Set always : Yes

    [#Field: EI PortDestination]
    Set as: $udfCity:Ledger:$PartyLedgerName

    [Line: lnDocThru]
    Field : Medium Prompt, EI DueDate
    Local : Field : Medium Prompt : Info : "Documents Thru :"

    [#Field: EI DueDate]
    Table : tblDocThru
    ShowTable: Always
    Set As: "Direct"

    [Collection: tblDocThru]
    Title: "Thru"
    List : "Direct", "IOB"

    [Line: lnDocBank]
    Field: Medium Prompt, EI Terms
    Local: Field : Medium Prompt : Set as : "Bank Details :"
    Local : Field : Medium Prompt : Inactive : $$Line > 1 or #EIDueDate = "Direct"
    Local: Field : EI Terms : Inactive: $$Line > 2 or #EIDueDate = "Direct"

    [Line: lnRemark]
    Field: Medium Prompt,fldInvRemark
    Local: Field : Medium Prompt : Info : "Remarks"

    [Field: fldInvRemark]
    Use: Name Field
    Width: 28
    Max: 60
    Set Always: Yes
    Storage: udfInvRemark
    Lines: 2

    [Line: lnCExNo]
    Field: Medium Prompt,fldCExNo,Short Prompt,fldCExDt
    Local: Field : Medium Prompt : Info : "C.Ex Inv No."
    Local: Field : Short Prompt : Info : "Dt."

    [Field: fldCExNo]
    Use: Name Field
    Width: 10
    Max: 10
    Set Always: Yes
    Storage: udfCExNo

    [Field: fldCExDt]
    Use: Short Date Field
    Set Always: Yes
    Storage: udfCExDt

    [#Line: EI InvInfo]
    Delete: Explode : STKVCH AltUnitsExplosion

    [#Line: CI InvInfo]
    Delete: Explode : STKVCH AltUnitsExplosion

    [#Part: EI Column]
    Add: Line : Before : EI ColumnOne : lnDisDtl

    [Line: lnDisDtl]
    Fields: fldDis,fldQDis,fldCDis
    Right Fields: fldHand,fldChar,fldIns

    [Field : fldDis]
    Field : Medium Prompt,fldTrdPer,Short Prompt,fldDisPer,fldDisP,fldDiscount
    Local : Field : Short Prompt : Info : "Discount @"
    Local : Field : Medium Prompt : Info : "Trade Discount @"

    [Field: fldTrdPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfTrdDis
    Set As: if $$InCreateMode And $PriceLevel Containing "Second" then 30 Else if $$InCreateMode And $PriceLevel Containing "II" Then 0 Else $$Value
    Invisible: NOT @@IsSales
    Set Always: Yes

    [Field: fldDisPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfDisPer
    ;;Set Always: Yes
    Invisible: NOT @@IsSales
    Set As: if #fldDiscount > 0 then 0 else $$Value

    [Field: fldDisP]
    Use: Short Prompt
    Info: "Rs."
    Width: 4

    [Field: fldDiscount]
    Use: Amount Field
    Align: Right
    Format: "No Zero"
    Storage: udfDisAmt
    ;;Set Always: Yes
    Invisible: NOT @@IsSales
    Set As: if #fldDisPer > 0 then 0 else $$Value

    [Field : fldQDis]
    Field : Short Prompt,fldQDisPer
    Local : Field : Short Prompt : Info : "Qty Discount @"

    [Field: fldQDisPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfQtyDisPer
    ;;Set Always: Yes
    Invisible: NOT @@IsSales

    [Field : fldCDis]
    Field : Short Prompt,fldCDisPer
    Local : Field : Short Prompt : Info : "Cash Dis @"

    [Field: fldCDisPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfCashDisPer
    ;;Set Always: Yes
    Invisible: NOT @@IsSales

    [Field : fldHand]
    Field : Short Prompt,fldHandPer,fldDisp,fldPakAmt
    Local : Field : Short Prompt : Info : "Packing @"

    [Field: fldHandPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfHandPer
    Set Always: Yes
    Invisible: NOT @@IsSales
    Set As: if #fldPakAmt > 0 then 0 else $$Value

    [Field: fldPakAmt]
    Use: Amount Field
    Align: Right
    Format: "No Zero"
    Storage: udfPakAmt
    Set Always: Yes
    Invisible: NOT @@IsSales
    Set As: if #fldHandPer > 0 then 0 else $$Value


    [Field : fldChar]
    Field : Short Prompt,fldCharPer
    Local : Field : Short Prompt : Info : "Charity @"

    [Field: fldCharPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfCharPer
    ;;Set Always: Yes
    Set As: if $$InAlterMode then $$Value Else 0.2
    Invisible: NOT @@IsSales

    [Field : fldIns]
    Field : Short Prompt,fldInsPer
    Local : Field : Short Prompt : Info : "Insurance @"

    [Field: fldInsPer]
    Use: Number Field
    Width: @@VCHDiscountWidth
    Align: Right
    Max: 5
    Format: "Percent"
    Storage: udfInsPer
    ;;Set Always: Yes
    Set As: if $$InAlterMode then $$Value Else 2
    Invisible: NOT @@IsSales

    [#Line: CI InvDetails]
    Delete: Option : CI AddMarks

    [#Line: EI InvDetails]
    Delete: Option : EI AddMarks

    [#Line: EI InvInfo]
    Add: Right Field : After : VCHDiscount : fldTotal1,fldDAmt,fldQAmt,fldCAmt,fldCharAmt,fldInsAmt,fldHandAmt,fldNarr,fldQty

    [#Line: CI InvInfo]
    Add: Right Field : After : VCHDiscount : fldTotal1,fldDAmt,fldQAmt,fldCAmt,fldCharAmt,fldInsAmt,fldHandAmt,fldNarr,fldQty

    [#Field: VCH StockItem]
    Unique: Yes

    [#Field: VCHBATCH Discount]
    Set as : if $BilledQty = 0 then 0 else if $$InCreateMode Then #fldTrdPer Else $$Value
    Skip: Yes
    [#Field: VCHDiscount]
    Skip: Yes

    [Field: fldDAmt]
    Use: Amount Field
    Storage: udfDisAmt
    Set Always: Yes
    Set As: if $StockItemName Containing "Discount" Then @RndVal Else 0
    RndVal: $$RoundUp:mad:N1:mad:N2
    N1: #fldTotal1 * #fldDisPer / 100
    N2: 0.50
    Skip: Yes
    Invisible: Yes

    [Field: fldQAmt]
    Use: Amount Field
    Storage: udfQtyDisAmt
    Set Always: Yes
    Set As: if $StockItemName Containing "Discount" Then @RndVal Else 0
    RndVal: $$RoundUp:mad:N1:mad:N2
    N1: #fldTotal1 * #fldQDisper / 100
    N2: 0.50
    Skip: Yes
    Invisible: Yes

    [Field: fldCAmt]
    Use: Amount Field
    Storage: udfCashDisAmt
    Set Always: Yes
    Set As: if $StockItemName Containing "Discount" Then @RndVal Else 0
    RndVal: $$RoundUp:mad:N1:mad:N2
    N1: #fldTotal1 * #fldCDisper / 100
    N2: 0.50
    Skip: Yes
    Invisible: Yes

    [Field: fldHandAmt]
    Use: Amount Field
    Storage: udfHandAmt
    Set Always: Yes
    Set As: if $StockItemName Containing "Discount" Then @RndVal Else 0
    RndVal: $$RoundUp:mad:N1:mad:N2
    N1: (#fldTotal1 - #fldDAmt - #fldQAmt - #fldCAmt - #fldDiscount) * #fldHandPer / 100
    N2: 0.50
    Skip: Yes
    Invisible: Yes

    [Field: fldCharAmt]
    Use: Amount Field
    Storage: udfCharAmt
    Set Always: Yes
    Set As: if $StockItemName Containing "Discount" Then @RndVal Else 0
    RndVal: $$RoundUp:mad:N1:mad:N2
    N1: (#fldTotal1 - #fldDAmt - #fldQAmt - #fldCAmt - #fldDiscount) * #fldCharPer / 100
    N2: 0.50
    Skip: Yes
    Invisible: Yes

    [Field: fldInsAmt]
    Use: Amount Field
    Storage: udfInsAmt
    Set Always: Yes
    Set As: @RndVal
    RndVal: $$RoundUp:mad:N1:mad:N2
    N1: (#fldTotal1 - #fldDAmt - #fldQAmt - #fldCAmt - #fldDiscount) * #fldInsPer / 100
    N2: 0.50
    Skip: Yes
    Invisible: Yes

    [Field: fldNarr]
    Use: Voucher Narration Field
    Set Always: Yes
    Set As: if $$Line = 1 then @Prt else $$PrevLineField + "," + @Prt
    Prt: $PartNo:StockItem:$StockItemName + "-" + @QtyOnly
    QtyOnly: $$StringPart:mad:Qty:0:mad:QtyOnlyLen
    QtyOnlyLen: @QtyLen - @UntLen
    UntLen: $$StringLength:mad:Unt
    Unt: $$StringRemWord:1:mad:Qty
    QtyLen: $$StringLength:mad:Qty
    Qty: $$String:#fldQty
    Storage: udfNarr
    Invisible: Yes

    [Field: fldQty]
    Use: Qty Field
    Set As: #VCHBilledQty
    Invisible: Yes
    Set Always: Yes


    [#Field: VCH Rate]
    Setval : if @@HasInvSubAlloc then $BatchRate else +
    if $BilledQty = 0 then 0 else +
    if $$IsValidPriceLevel:$PriceLevel then $$ForexValue:mad:@StdVchRate else +
    if $StockItemName != #VCHPrevItem AND NOT $$IsStartupValue then $$ForexValue:mad:@StdVchRate else +
    if $$IsFieldEdited OR $$InAlterMode then $$Value else +
    if $$IsEmpty:$$Value then $$ForexValue:mad:@StdVchRate else $$Value

    [#Field: VCH Value]
    ResetVal: if $StockItemName Not Containing "Discount" then (($Rate * $BilledQty * (100 - $Discount)) / 100) Else @AddVal
    BatchTotal : if $StockItemName Not Containing "Discount" Then (($Rate * $BilledQty * (100 - $Discount)) / 100) else @AddVal
    AddVal: #fldHandAmt + #fldCharAmt + #fldInsAmt + #fldPakAmt - #fldDAmt - #fldQAmt - #fldCAmt - #fldDiscount
    Set Always: Yes

    [Field: fldTotal1]
    Use: Amount Field
    Set As: $$PrevTotal:VCHValue
    Set Always: Yes
    Invisible: Yes

    [#Field: VCH Narration]
    Set Always: Yes
    Set As: if @@IsSales Then ($$CollectionField:$udfNarr:mad:LastItm:InventoryEntries + " = " + $$String:mad:Qty1) Else ""
    Qty: $$CollQtyTotal:InventoryEntries:$BilledQty
    Qty1: $$Number:mad:Qty
    LastItm: $$NumItems:InventoryEntries
    Skip: @@IsSales
     


  4. sk.mahendran

    sk.mahendran New Member


    Enclosing the TDL as a TXT file
     

    Attached Files:



  5. ash007

    ash007 New Member


    Can u provide double Discount column tdl.. Which i have its not working For Normal invoice
     


Share This Page