Page 1 of 1

Cash Book CSV Import

PostPosted: Wed Mar 17, 2021 6:56 pm
by DannyC
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 11169 times

Re: Cash Book CSV Import  Topic is solved

PostPosted: Wed Mar 17, 2021 7:12 pm
by nsbandara
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

Re: Cash Book CSV Import

PostPosted: Wed Mar 17, 2021 7:28 pm
by DannyC
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?

Re: Cash Book CSV Import

PostPosted: Thu Mar 18, 2021 11:19 am
by Mike.Sheen
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.

Re: Cash Book CSV Import

PostPosted: Thu Mar 18, 2021 12:38 pm
by DannyC
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.

Re: Cash Book CSV Import

PostPosted: Thu Mar 18, 2021 12:57 pm
by SBarnes
No you new plugin references Cashbook Bank CSV just as Bendigo Bank does

Re: Cash Book CSV Import

PostPosted: Thu Mar 18, 2021 1:07 pm
by Mike.Sheen
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.

Re: Cash Book CSV Import

PostPosted: Fri Mar 19, 2021 11:03 am
by SBarnes
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.