Cash Book CSV Import  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Cash Book CSV Import

Postby DannyC » Wed Mar 17, 2021 6:56 pm

Hi,
I enabled the plugin Cashbook Bank CSV Import but can't work out how it's supposed to work.
I found that it's (the button) disabled, until I have an empty cash book, and then also have a bank account selected.

But when I click the button, I just get an empty white box. What is supposed to happen and how should it work?
CashBookCSVImport.png
CashBookCSVImport.png (10.69 KiB) Viewed 11161 times
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Cash Book CSV Import  Topic is solved

Postby nsbandara » Wed Mar 17, 2021 7:12 pm

Hi Danny,

To add import options you have to implement and register cash book import providers. Please see Jiwa sample plugin Bendigo Bank Cashbook CSV Imports
User avatar
nsbandara
Occasional Contributor
Occasional Contributor
 
Posts: 43
Joined: Tue Jul 16, 2013 5:02 pm
Location: Sri Lanka
Topics Solved: 11

Re: Cash Book CSV Import

Postby DannyC » Wed Mar 17, 2021 7:28 pm

you have to implement and register cash book import providers

Where do I get them from? Wouldn't that be documented somewhere in the Cashbook Bank CSV Import plugin?
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Cash Book CSV Import

Postby Mike.Sheen » Thu Mar 18, 2021 11:19 am

DannyC wrote:
you have to implement and register cash book import providers

Where do I get them from? Wouldn't that be documented somewhere in the Cashbook Bank CSV Import plugin?


You mean like in the description of the plugin?

From the Cashbook Bank CSV Import plugin description:
Provides a framework for plugins to register as a CSV Import provider.

Other plugin(s) when registered will cause the CSV Import tool on the Actions group of the ribbon to contain an entry for the import.

A custom field, ImportedCSVHash is calculated and stored on the line if imported, and when importing if any previous batch for the same bank account has a line with the same hash, then the line is omitted as it is assumed to have been imported already. As the hash is calculated on the CSV data, this means even if the line is edited in Jiwa by the user, duplicate lines will still be recognised.


As Nishantha stated, an example of this implementation is the Bendigo Bank Cashbook CSV Imports plugin.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Cash Book CSV Import

Postby DannyC » Thu Mar 18, 2021 12:38 pm

You mean like in the description of the plugin?

Yep, I can read! Clear as mud. ;)

an example of this implementation is the Bendigo Bank Cashbook CSV Imports plugin

which references the Cashbook Bank CSV Import plugin.

So in the Cashbook Bank CSV Import, do I add a reference to itself? That doesn't make sense.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Cash Book CSV Import

Postby SBarnes » Thu Mar 18, 2021 12:57 pm

No you new plugin references Cashbook Bank CSV just as Bendigo Bank does
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Cash Book CSV Import

Postby Mike.Sheen » Thu Mar 18, 2021 1:07 pm

SBarnes wrote:No you new plugin references Cashbook Bank CSV just as Bendigo Bank does


Yep. Easiest way is to open the Bendigo one, Copy it using the copy button, change the name to what you want, and then it's just fiddling with the code to read and ingest the CSV.

To be clear: You need the Cashbook Bank CSV Import plugin enabled AND one or more "other" plugins which implement the interface (Bendigo Bank Cashbook CSV Imports plugin being an example). The Cashbook Bank CSV Import plugin provides the framework for other plugins to register themselves - when they do they appear in the drop-down which you saw as being empty - and when an item is selected from the drop-down, the code for the registered provider is run to import the CSV.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Cash Book CSV Import

Postby SBarnes » Fri Mar 19, 2021 11:03 am

You may also also need to set the execution order of your plugin to be a number grater than the CSV import one just so that it is compiled first as I have seen this be an issue with dependent plugins such as the REST Api.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests