UPI Payment In Tally With QR Code & Without QR Code

Discussion in 'Free Source Codes' started by ROHIT JAISWAR, Aug 4, 2021.

    
  1. ROHIT JAISWAR

    ROHIT JAISWAR Member



  2. tejeet

    tejeet Member



  3. Rohit Khedar

    Rohit Khedar Member



  4. ROHIT JAISWAR

    ROHIT JAISWAR Member


    Code:
    ;; Display at terms in invoice
    
    [#Part: EXPINV Terms]
      Delete:Lines
      Delete:Parts
      Delete:Repeat
      Delete:Invisible
      Add:Height:8
      Add:Line:EXPINV Logo
      QR Code:$$InitQrCodeGeneration
        
    
    ;F11 Accounts info Configuration
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RADHE - RADHE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    ;;;; CODE FOR ADD ON ACTIVATION ;;;;; (Ctrl+Alt+T then F4 then F11 + F6 For ERP) & (Ctrl+Alt+T then F4 then F6 For Prime)
    
    [#Part  : CMP TallyShopFeatures Left]    
    
        Add :  Line : At End  : RJACTIVATEMODULE
      
    [Line:RJACTIVATEMODULE]
      
        Fields    :    Long Prompt,RJACTIVATEMODULE
        Local    :    Field    :    Long Prompt        :    Set as        :    "Configure Qr Code for Invoices?"
        Local    :    Field    :    Long Prompt        :    Style        :    RJSTYLE
        Local    :    Field    :    Long Prompt        :    Background    :    Yellow  
        Local    :    Field    :    Long Prompt        :    Color        :    Blue
        Local    :    Field    :    Long Prompt        :    Width        :    40
      
    [Field:RJACTIVATEMODULE]
      
        Use            :    Logical Field
        Table        :    YesNoTable
        Set Always    :    Yes
        Show Table    :    Always
        Storage        :    RJACTIVATEMODULE
        Sub Form    :    QrConfig:$$Value
        Style        :    RJSTYLE
        Background    :    Blue
        Color        :    Yellow
        Width        :    10
      
    [Style:RJSTYLE]
      
        Font    : if $$SysInfo:IsWindows then "Arial" else "Helvetica"
        Height  : @@RJSize
      
    [System: Formula]
    
        RJSize  : 10
        IsCustomizationEnabled    :    $RJACTIVATEMODULE:Company:##SVCurrentCompany
      
    [System:UDF]
      
        RJACTIVATEMODULE    :    Logical    :    1011
        VTYPRJACTIVATEMODULE:    Logical    :    1012
      
    [System:UDF]
        QrIncludeAmount:Logical:7927
        QrPaymentMode:String:7234
        QrUpiId:String:7235
        ;QrBankIfsc:String:7236
        ;QrBankAccount:String:7437
        ;QrMobileNo:String:7438
        QrMmid:String:7439
      
    
    ;Report for Qr Configuration
    
    
    [Report:QrConfig]
        Title:"QrCode Configuration"
        Form:QrConfig
      
    [Form:QrConfig]
        Width:50% page
        Part:QrConfig
      
    [Part:QrConfig]
        Lines:QrConfigTitle,QrPaymentMode,QrIncludeAmount,QrUpiId;,QrBankAccount,QrBankIfsc,QrMobileNo,QrMmid
        Space Bottom:2
        Space Left:2
        Space Right:2
        Space Top:2
        Line:QrHelpLine
      
    [Line:QrConfigTitle]
        Field:Name Field
        Local:Field:Name Field:Info:"Configure Qr Code Settings"
        Local:Field:Name Field:Full Width:Yes
        Local:Field:Name Field:Align:Center
        Local:Field:Name Field:Border:thinbottom
      
    [Line:QrPaymentMode]
        Space Top:0.5
        Fields:LongPrompt,QrPaymentMode
        Local:Field:LongPrompt:Info:"Payment Mode"
      
    [Field:QrPaymentMode]
        Use:Name Field
        ;Table:QrPaymentModes
        Set as    :    "UPI ID"
        Set Always:Yes
        Show Table:Always
        Storage:QrPaymentMode
        Width:50
        Dynamic    : ""
        Read Only:Yes
      
      
    [Collection:QrPaymentModes]
        Title:"Payment Modes"
        List Name:"UPI ID","Bank Account & IFSC","Mobile Number & MMID"
      
    [Line:QrIncludeAmount]
        Field:Long Prompt,QrIncludeAmount
        Local:Field:LongPrompt:Info:"Include Amount?"
        Space Top:0.5
    
    [Field:QrIncludeAmount]
        Use:Logical Field
        Show Table:Always
        Set as:No
        Storage:QrIncludeAmount
      
    [Line:QrUpiId]
        Field:Long Prompt,QrUpiId
        Local:Field:LongPrompt:Info:"Enter UPI Id"
        Space Top:0.5
        Local    : Field    : Long Prompt    : Inactive: @@NOUPID
        Invisible    : @@NOUPID
      
    [Field:QrUpiId]
          
        Storage:QrUpiId
        Use:Name Field
        Width:50
        Case    :    Lower Case
        Inactive: @@NOUPID
        Control:QrInvalidMsg:$$IsEmpty:$$Value
      
    [System    : Formula]
      
        QrPaymentMode:$QrPaymentMode:Company:##SvCurrentCompany
        NoUPID    : $QrPaymentMode!="UPI ID"
        NoBank    : $QrPaymentMode!="Bank Account & IFSC"
        NoMMID    : $QrPaymentMode!="Mobile Number & MMID"
        QrUPId :$QrUpiId:Company:##SvCurrentCompany
        QrBankAccount :$$LocaleString:($QrBankAccount:Company:##SvCurrentCompany)
        QrIFSCode :$QrBankIfsc:Company:##SvCurrentCompany
        QrMobileNo :$$LocaleString:($QrMobileNo:Company:##SvCurrentCompany)
        QrMMID : $$LocaleString:($QrMmid:Company:##SvCurrentCompany)
        IsQrAmountInclude:$QrIncludeAmount:Company:##SvCurrentCompany
        QrInvalidMsg:"Invalid Input!"
      
    
    [Line:QrBankAccount]
        Field:Long Prompt,QrBankAccount
        Local:Field:LongPrompt:Info:"Enter Bank Account Number"
        Space Top:0.5
        Local    : Field    : Long Prompt    : Inactive: @@NoBank
        Invisible    : @@NOBank
    [Field:QrBankAccount]
        Storage:QrBankAccount
        Use:Name Field
        Width:50
        Format:NoComma,NoZero
        Inactive: @@NoBank
        Control:QrInvalidMsg:$$IsEmpty:$$Value
      
    
    [Line:QrBankIfsc]
        Field:Long Prompt,QrBankIfsc
        Local:Field:LongPrompt:Info:"Enter IFSC Code"
        Space Top:0.5
        Local    : Field    : Long Prompt    : Inactive: @@NoBank
        Invisible    : @@NOBank
      
    [Field:QrBankIfsc]
        Storage:QrBankIfsc
        Use:Name Field
        Width:50
        Inactive: @@NoBank
        Control:QrInvalidMsg:$$IsEmpty:$$Value
    
    [Line:QrMobileNo]
        Field:Long Prompt,QrMobileNo
        Local:Field:LongPrompt:Info:"Enter Mobile Number"
        Space Top:0.5
        Local    : Field    : Long Prompt    : Inactive: @@NoMMID
        Invisible    : @@NOMMID
      
      
    [Field:QrMobileNo]
        Storage:QrMobileNo
        Use:Name Field
        Width:50
        Format:NoComma,NoZero
        Inactive: @@NOMMID
        Control:QrInvalidMsg:$$IsEmpty:$$Value
      
    [Line:QrMmid]
        Field:Long Prompt,QrMmid
        Local:Field:LongPrompt:Info:"Enter MMID"
        Space Top:0.5
        Local    : Field    : Long Prompt    : Inactive: @@NoMMID
        Invisible    : @@NOMMID
    
      
    [Field:QrMmid]
        Storage:QrMmid
        Use:Name Field
        Width:50
        Format:NoComma,NoZero
        Inactive: @@NoMMID
        Control:QrInvalidMsg:$$IsEmpty:$$Value
    
      
    
    [Line:QrHelpLine]
        Space Top:2
        Field:SimpleField
        Local:Field:Simple Field:Info:"**Make Sure Above Entered Information is  Valid and Working"
        Local:Field:Simple Field:Align:Center
        Local:Field:Simple Field:Full Width:Yes
        Local:Field:Simple Field:Color:Red
      
    
    
    [Function:InitQrCodeGeneration]
        Variable:QString: String:"upi://pay?"
        Variable:QinvNumber:String:$$StringFindAndReplace:($$String:$VoucherNumber):"_":"-"
        Variable:QPartyName:String:$$TrimRefId:($$StringFindAndReplace:$PartyLedgerName:"_":"-")
        Variable:QCompany:String:$$TrimRefId:($$StringFindAndReplace:##SvCurrentCompany:"_":"-")
        Variable:QAmount:String:($$LocaleString:($$Number:$Amount))
      
      
        10:If:@@QrPaymentMode contains "UPI ID"
        11:Set:QString:##QString+"pa="+@@QrUPId+"&"
        12:Set:QString:##QString+"pn="+##QCompany+"&"
        13:Set:QString:##QString+"mc=0000&"
        14:Set:QString:##QString+"tr="+##QinvNumber+"_"+##QPartyName+"_Pay%20to%20"+##QCompany+"&"
        amt1:If:@@IsQrAmountInclude
        15:Set:QString:##QString+"am="+##QAmount+"&"
        amt2:End If
        16:Set:QString:##QString+"mam=0&cu=INR"
        17:Return:##QString
        18:End If
    
      
    [Function:TrimRefId]
        Parameter:v1:String
      
    01:If:$$StringLength:##v1 > 4
    02:Return:$$StringPart:##v1:0:4
    03:Else
    04:Return:##v1
    05:End If
    
    
     
    Vashisth, torsky, Sanjeev S and 3 others like this.


  5. tejeet

    tejeet Member


    Thank you very much for sharing QR code tdl, sir, can you modify this code, I want a QR code next to bank details as per the attachment
     

    Attached Files:

    RAVI BANOTH likes this.


  6. ROHIT JAISWAR

    ROHIT JAISWAR Member


    this is the sample code for learining purpose only
    modify as per you want else if you want it for business purpose then it will chargeable basis
     


  7. Rohit Khedar

    Rohit Khedar Member


    Hear we set QR code in Invoice .
    Good set and success but changing in Invoice Top Right Part in Width .
    If any one expert can this solution so See my Screenshot and solve plz.
    Code:
    [#Part: EXPINV BankDetails]
       
    Delete : Lines
    Delete : Parts
    Delete : Repeat
    Delete : Invisible
    Delete : Option
                               
                           
    Add : Left Part : EXPINV BankDetails1
    Add : Right Part : EXPINV BankDetails2
    
    Vertical        : No
    
    
    [Part: EXPINV BankDetails1]
       
        Line : EXPINV Logo
            Graph Type: ##SALogoPath;$LogoPath:Company:##SVCurrentCompany
        Horizontal Align    : Center           
        Width    : 10
        Height :  5
                       
    
                   
    [Part: EXPINV BankDetails2]
       
        Line        : EXPINV BankTitle, EXPINV BankName, EXPINV BankAccNo, EXPINV BankBranchInfo
        Invisible   : NOT ##SABankInfo OR $$IsEmpty:@@VchBankName
        Local        : Field :Medium Prompt : Style    : Tiny
        Option        : GVAT EXPINV BankDetails    : @@IsGCCCountries
        Option        : Kenya EXPINV BankDetails    : @@IsKenya   
               
    
    
     

    Attached Files:



  8. ROHIT JAISWAR

    ROHIT JAISWAR Member


    Try to Decrease Width 10 to 9 or 8 or resize your qr jpeg in decreasing pixcels
     


  9. Rohit Khedar

    Rohit Khedar Member


    I Try to Image and code but not succeed please set Mr. Rohit
     


  10. ROHIT JAISWAR

    ROHIT JAISWAR Member


    okay will check and update you
     


  11. torsky

    torsky New Member


    please provide the code, I can pay. code should appear near the bank information, outstanding reports. should have title Pay via UPI
    share your email so we can talk on mail
     


  12. ROHIT JAISWAR

    ROHIT JAISWAR Member



  13. JOHNPETERT

    JOHNPETERT New Member


    UPI Payment In Tally With QR Code & Without QR Code
     



  14. Thank you Sir.....
     


  15. S k singh

    S k singh New Member


    How Can we make this qr Dynamic ?
     


Share This Page