Add element of enum PaymentTypes  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Add element of enum PaymentTypes

Postby DannyC » Tue Dec 13, 2022 2:03 pm

Currently there are 2 values in JiwaCreditorChqPay.CreditorChequePayment.PaymentTypes
namely Cheque and EFT.
I want to add another, BPay.

How can I do that?
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Add element of enum PaymentTypes  Topic is solved

Postby SBarnes » Tue Dec 13, 2022 2:51 pm

In short I don't believe you can as an enum is a declared and compiled type, below is its declaration, but what are you actually trying to achieve as there might be another way?


Code: Select all
Public Enum PaymentTypes
        Cheque = 0
        EFT = 1
    End Enum
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Add element of enum PaymentTypes

Postby DannyC » Wed Dec 14, 2022 8:19 am

what are you actually trying to achieve


I want to add another, BPay.


So I guess I want it to be something like
Code: Select all
Public Enum PaymentTypes
        Cheque = 0
        EFT = 1
        BPay = 2
    End Enum
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Add element of enum PaymentTypes

Postby SBarnes » Wed Dec 14, 2022 8:35 am

Well I don't believe you can, and technically BPay is an EFT at any rate.

The only other suggestion I can make to you is add a check box to the screen that can only be checked when EFT is picked and store the data in a custom field if available(I don't think it is) or add a table that links to the primary key of the business object and has a bit field called BPay. You would then need code on the events Read End, Created, Copy and Save Ending to do the necessary CRUD operations, you can use a cascading delete if the screen allows for delete to do the delete.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 27 guests