NEED HELP PRICE LEVEL

Discussion in 'Free Source Codes' started by rahul nigotiya, Dec 24, 2019.

    
  1. NSA

    NSA Member


    Sir,

    You have provide me a proper guiding. Thank you.

    [#System: formula]
    PriceLevelRate : ($$GetPriceFromLevel:$StockItemName:$PriceLevel:$Date:$BilledQty)+0.005

    Now I will start to develop the UDF to make a detailed multilevel pricing.

    Once again thanking you for the proper and timely guidence
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    ;):):confused::confused: Then....where are the LIKES ??? :cool::cool:
     
    NSA likes this.


  3. NSA

    NSA Member


    :D:D:D:D:D
     


  4. NSA

    NSA Member


    Sir, as I told before, I was trying to incorporate a special rate for customer, but my table is unable to skip or breakon from RCPRateCard. Its is stucked in the Subform. Can you please help me?
    [#Part : LEd Other Details]
    Add : Line : RCPRateCardLine
    Invisible : NOT $$IsBelongsTo:$$GroupSundryDebtors
    [Line : RCPRateCardLine]
    Field : Name field, RCPRateCardYesno, RCPRateCardSub
    Local : Field : name field : Set as:"Special Rate Applicable?"
    Local : Field : name field : Skip: Yes
    [Field: RCPRateCardYesno]
    Use : Name Field
    Table : RCPRateCardYesnoTable
    Show Table Always : yes
    Storage : RCPRateCardYesno
    Set Always : Yes

    [Field: RCPRateCardSub]
    Use : Name field
    Width : 1 inch
    Sub Form : RCPRateCard : $RCPRateCardYesno = $$LocaleString:"Yes"
    Inactive : if $RCPRateCardYesno ="No" then Yes Else No
    Set Always : Yes
    [Report : RCPRateCard ]
    Form : RCPRateCard
    Object : Ledger

    [Form: RCPRateCard]
    Part : RCPRateCardHd, RCPRateCard
    Background : Light Lily Yellow
    [Part: RCPRateCardHd]
    Lines : RCPRateCardHd
    Border : Column Titles
    [Line: RCPRateCardHd]
    Use : RCPRateCard
    Local : Field : Default : Style : Small Bold
    Local : Field : Default : Skip : Yes
    Local : Field : Default : Type : String
    Local : Field : Default : Delete: Storage
    Local : Field : Default : Lines : 2
    Local : Field : RCPRateCard SName : Set as: "Commodities"
    Local : Field : RCPRateCard SRate : Set as: "Price"
    Local : Field : Default : Delete: Inactive

    [Part: RCPRateCard]
    Lines : RCPRateCard
    Repeat : RCPRateCard: Vch Stock Item Extract
    Scroll : Vertical
    CommonBorder: Yes
    Breakon: $$IsEnd:$RCPRateCardSName

    Scroll : Vertical


    [Line: RCPRateCard]
    Fields :RCPRateCard SName, RCPRateCard SRate
    Local : Field : Default : Delete : Border

    [Field: RCPRateCard SName]
    Use : Short Name Field
    Table : List of ExtractStockItems, Create Master: $$Line = 1
    Table : List of ExtractStockItems, EndofList, Create Master: $$Line > 1
    Unique : Yes

    Storage : RCPRateCard SName
    width : 30


    [Field: RCPRateCard SRate]
    Use : Rate Price Field
    width : 20
    Storage : RCPRateCard SRate
    Inactive : $$IsEnd:$RCPRateCardSName

    [System: UDF]
    RCPRateCard : Aggregate: 30000
    RCPRateCard SName : String : 30000
    RCPRateCard SRate: Rate:30000



    [System : UDF]
    RCPRateCardYesno :String: 220

    [Collection: RCPRateCardYesnoTable]
    Title: $$LocaleString:"Selcect As"
    List Name: $$LocaleString:"No"
    List Name: $$LocaleString:"Yes"
     


  5. NSA

    NSA Member



    Finally I think, I have achieved it!!!!! Dear Amit Sir, Please do correct me if the coding need any further improvements or modifications. My purpose for the below coding is for the following scinario:

    Location (Primary Price Level) Rate
    A 5
    B 6
    C 7

    Now by coding I can set an increment or decrement in price to each customers separately.

    ;; Selling Price fixation according to Price Level combined with UDF Value
    [#System: formula]
    PriceLevelRate : ($$GetPriceFromLevel:$StockItemName:$PriceLevel:$Date:$BilledQty)+($(Ledger,$PartyLedgerName).RCPRateCardAggregate[1,@@IsSameItem].RCPRateCardSRate)
    [System : Formula]
    IsSameItem : $$ReqObject:$StockitemName = $RCPRateCardSName

    ;; UDF Definition
    [System: UDF]
    RCPRateCardAggregate : Aggregate: 30000
    RCPRateCardSName : String : 30001
    RCPRateCardSRate: Amount: 30002

    ;; Creating UDF Rates in Debtors Ledger

    [#Part: MST LED Explode Sundry]
    Add : Line : At end : RCPRateCardLine

    [Line : RCPRateCardLine]
    Field : Medium Prompt, RCPRateCardYesno
    Local : Field : Medium Prompt : Set As : “Set/Alter Special Rates :”

    [Field: RCPRateCardYesno]
    Use : Logical Field
    Set As : No
    Sub Form : RCPRateCard : $$Value

    [Report : RCPRateCard ]
    Form : RCPRateCard
    [Form: RCPRateCard]
    Part : RCPRateCardHd, RCPRateCard
    Background : Light Lily Yellow
    [Part: RCPRateCardHd]
    Lines : RCPRateCardHd
    Border : Column Titles
    [Line: RCPRateCardHd]
    Use : RCPRateCard
    Local : Field : Default : Style : Small Bold
    Local : Field : Default : Skip : Yes
    Local : Field : Default : Type : String
    Local : Field : Default : Delete: Storage
    Local : Field : Default : Lines : 2
    Local : Field : RCPRateCard SName : Set as: "Commodities"
    Local : Field : RCPRateCard SRate : Set as: "Price"
    Local : Field : Default : Delete: Inactive

    [Part: RCPRateCard]
    Lines : RCPRateCard
    Repeat : RCPRateCard: RCPRateCardAggregate
    Scroll : Vertical
    CommonBorder: Yes
    Break on : $$IsEnd:$RCPRateCardSName

    Scroll : Vertical


    [Line: RCPRateCard]
    Fields :RCPRateCardSName, RCPRateCardSRate
    Local : Field : Default : Delete : Border

    [Field: RCPRateCard SName]
    Use : Short Name Field
    Table : List of ExtractStockItems, EndofList
    Unique : Yes

    Storage : RCPRateCardSName
    width : 30


    [Field: RCPRateCardSRate]
    Use : Amount Field
    width : 20
    Storage : RCPRateCardSRate
    Inactive : $$IsEnd:$RCPRateCardSName
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Good Job... Keep it on.......

    It looks good. But cannot comment on your code, as I do not understand the concept or your business model. But if it is working for you, then it is obviously good.
     


  7. NSA

    NSA Member


    Sir,

    My business model is we have multiple locations for delivery and each location has different prices. So I have to set location as the price level. But some of the customer needs special price. And they are contractors so they will be ordering for all the location. By default tally allows only one price allocation for the customer level. So this code will enable me to add or less the prices from the main price list which is based on location

    For example,

    Price level in tally:
    Price level ------Price
    Factory------------20
    Location A_------25
    Location B--------30

    In the above situation if I want to fix a special contract price where the customer "X" need five 5 Rs less from all the sites Base price. Then I can use the above code.

    (In the above code I just made addition to the price level, but in the above example I am deducting it). This I have corrected in my coding.

    I hope you understand the concept.


    But still I remember, the first time when I asked you for a developers number, you were asking me to learn development.

    You are really a good motivator and teacher. Thank you for your kind support.
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Very Good. Nice design and concept.

    Am always glad to help and push people towards learning and knowledge. In School/College Professors do not study and write exams for us. The students have to make their own efforts. Same principle here. And am glad, you took it positively and chose to learn and develop on your own.

    Good Luck for more interesting things to develop in the future.
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    As regards PRICE LEVEL .... Price level in Tally is quite robust and in depth. You can assign Rates as per quantities ordered, have discount %ages based on size of order etc. You can also have price level based on customer/Year/product -wise etc

    All it requires is proper construct of the DATA with proper Groupings/Categories etc.

    When you have free time, you should also go through PRICE LEVEL tutorials / manuals. You can find many on youtube.
     


  10. NSA

    NSA Member


    Thank You Sir
     


  11. NSA

    NSA Member


    [#Line: STKVCH Batch2]
    Add : Option: RCPAgent STKVCH Batch2: @@Issales

    [!Line: RCPAgent STKVCH Batch2]
    Add : Right field : At end :RCPAgentCommisionFld6
    [Field : RCPAgentCommisionFld6]
    Use : Amount Forex Field
    Set As : @@RCPCommisionCondition
    width : 10
    Skip : yes
    Storage : RCPAgentCommisionbatch

    [System : Formula]
    RCPCommisionCondition: ($(Ledger,$PartyLedgerName).RCPAgentCardAggregate[1,@@IsSameItemforCommision].RCPAgentCardSRate) * $BilledQty
    IsSameItemforCommision : $$ReqObject:$StockitemName = $RCPAgentCardSName

    Sir in the above coding if remove (*BilledQty) I will get the value in the field. but When I add the multiplication by BilledQty, the filed (RCPAgentCommisionFld6) is showing nil.

    Is there any way I can resolve this?
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Then do step by step R&D........

    First of All ..... Just USE -- $BilledQty ......... as a number ,,,,,, is it coming???

    Second .... Use a number ------- * 10 ----- is it computing?
     


  13. NSA

    NSA Member


    It is not coming either tje $ BilledQty nor it is computing
     


  14. balajimg

    balajimg Active Member


    first convert $Billedqty & your ledger rate to type number and try
     


  15. NSA

    NSA Member


    How to convert it? Wher Can I find the syntax?
     


  16. balajimg

    balajimg Active Member


    Eg : $$Number:$BilledQty
     


  17. NSA

    NSA Member


    Thank you for your suggestion. I have changed every thing in UDF to Number and I have converted the Qty to Number. Now the it works
     


  18. NSA

    NSA Member


    Same way whether we can convert the number to Amount?

    $$Amount:$BilledQty
     


  19. NSA

    NSA Member


    Sir, Is there any way Can I convert the Number to Amount?
     


  20. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $$AsAmount
     


  21. NSA

    NSA Member


    T
    Thank you so much sir
     


  22. NSA

    NSA Member


    Dear Experts,

    I have created a location master with object as company and Aggregate as "Location Master" now I am trying to fill the field 'EI Price level'

    [#Field: EI PriceLevel]
    Use : Short Name Field
    Storage : Price Level
    Set As: If NOT $$IsEmpty:$PriceLevel:Ledger:$PartyLedgerName Then $PriceLevel:Ledger:$PartyLedgerName Else +
    ($(Company:##SVCurrentCompany).LocationMaster[1,@@RCPPriceLevelBasetoLocationCondition].RCPPriceLevelBasetoLocation)
    Skip : NOT @@DoEditAll AND NOT $$IsEmpty:$PriceLevel:Ledger:$PartyLedgerName AND $$IsValidPriceLevel:($PriceLevel:Ledger:$PartyLedgerName)
    Invisible : NOT @@WithPriceLevels or @@AcctsInvoice

    [System: Formula]
    RCPPriceLevelBasetoLocationCondition: $$ReqObject:$BASICFINALDESTINATION = $UniqueRCPLocationName


    But I am unable to get the UDF- RCPPriceLevelBasetoLocation the abstrasct of location master is as below. can anyone please suggest me for a proper coding to achieve it??

    [Report: Location Master]
    Form : Location Master
    Object : Company

    [Part: Location Master]
    Lines : Location Master
    Repeat :Location Master:Location Master

    [System: UDF]
    Location Master : Aggregate: 21000
    UniqueRCPLocationName : String : 21000
    RCPRegion: String: 21001
    RCPPriceLevelBasetoLocation: String: 21002
    RCPKM: Amount: 21000

    [#Field: EI PriceLevel]
    Use : Short Name Field
    Storage : Price Level
    Set As: If NOT $$IsEmpty:$PriceLevel:Ledger:$PartyLedgerName Then $PriceLevel:Ledger:$PartyLedgerName Else +
    ($(Company:##SVCurrentCompany).LocationMaster[1,@@RCPPriceLevelBasetoLocationCondition].RCPPriceLevelBasetoLocation)
    Skip : NOT @@DoEditAll AND NOT $$IsEmpty:$PriceLevel:Ledger:$PartyLedgerName AND $$IsValidPriceLevel:($PriceLevel:Ledger:$PartyLedgerName)
    Invisible : NOT @@WithPriceLevels or @@AcctsInvoice

    [System: Formula]
    RCPPriceLevelBasetoLocationCondition: $$ReqObject:$BASICFINALDESTINATION = $UniqueRCPLocationName
     


  23. NSA

    NSA Member


    It is Resolved

    [#Field: EI PriceLevel]

    Use : Short Name Field
    Storage : Price Level
    Set As : $$CollectionFieldByKey:$RCPPriceLevelBasetoLocation:mad:MyFormula:LocationMaster1
    MyFormula : $BASICFINALDESTINATION
    Set always : Yes

    Table : Price Levels, Not Applicable: $$IsEmpty:$PriceLevel:Ledger:$PartyLedgerName AND Not $$IsValidPriceLevel:($PriceLevel:Ledger:$PartyLedgerName) +
    And Not $$IsEmpty:mad:@Mysearch
    ShowTable : Always

    Skip : Yes
    Invisible : NOT @@WithPriceLevels or @@AcctsInvoice


    [Collection : LocationMaster1]
    Type : Location Master : Company
    Childof : ##SVCurrentCompany
    Fetch: RCPPriceLevelBasetoLocation, UniqueRCPLocationName
    Search Key : $UniqueRCPLocationName
    LocationMaster1
     


Share This Page