The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

gc-members-generate-invoices - Generate a CSV file suitable for importing into GnuCash.

DESCRIPTION

Generate a CSV file suitable for importing into GnuCash.

SYNOPSIS

  gc-members-generate-invoices

  # Provide a config file and GnuCash file 
  gc-members-generate-invoices --config my-config.yml --file my-organization.gnucash

  # Provide a note when posting the invoices
  gc-members-generate-invoices --config my-config.yml --note "January dues"

OPTIONS

--config ConfigFilename, -c ConfigFilename

Specify the filename for the config file.

--file GnuCashFilename, -f GnuCashFilename

Specify the filename for the GnuCash file.

--due DueDate, -D DueDate

Specify the due date for the posted invoices. Defaults to the last day of the current month.

--opened OpenedDate, -O OpenedDate

Specify the opened and invoice date for the posted invoices. Defaults to the first day of the current month.

--format DateFormat, -F DateFormat

Specify the date format used in GnuCash. NOTE: This must match the format specified in GnuCash Preferences.

Must be one of the following:

US

MM/DD/YYYY

UK

DD/MM/YYYY

EUROPE

DD.MM.YYYY

ISO

YYYY-MM-DD

DEFAULT: US

--memo InvoiceMemo, -m InvoiceMemo

Specify the memo to be joined to the membership type and used as the description for the item within the invoice.

--note PostingNote, -n PostingNote

Specify the note to be used when posting the invoice. This shows as the invoice description when viewing the customer report in GnuCash. Defaults to "XXXX membership dues" where XXXX is the name of the month for the --open date. For example "April membership dues"

--outfile OutputFilename, -o OutputFilename

Specify the output filename to use when generating the CSV file.

Defaults to YYYY-MM-DD_gnucash_customer_invoices.csv where YYYY-MM-DD is today's date in ISO format.

--version, -v
  Print version information and exit.
--help, -h, -?
  Display basic help.
--man, -m
  Display more detailed help.

GnuCash CSV Invoice Import Format

As documented on the GnuCash website

    * id - The invoice ID. If the invoice ID is blank, GnuCash replaces it with the invoice ID
            from the previous row. If the invoice ID already exists, GnuCash will add the entries
            to the existing invoice (unless it is already posted).

    * date_opened - Use the same date format as defined in Preferences. Defaulted to today's date
            if left blank, or if the date provided is not valid.

    * owner_id - Customer or vendor number. Mandatory in the first data row of an invoice. If not
            provided, all rows of the same invoice will be ignored.

    * billingid - Billing ID. Optional

    * notes - Invoice notes. Optional.

    * date - The date of the entry. Defaulted to date opened if left blank, or if the date provided
            is not valid.

    * desc - Description. Optional

    * action - Action. Optional

    * account - Account for the entry. Mandatory in each row. If not provided or invalid, all rows
            of the same invoice will be ignored.

    * quantity - Quantity. Defaulted to 1 if left blank.

    * price - Price. Mandatory for each row. If not provided, all rows of the same invoice will be
            ignored.

    * disc_type - Type of discount. Optional. Only relevant for invoices, not for bills.
            Use "%" or blank for percentage value, anything else for monetary value.

    * disc_how - Discount how. Optional. Only relevant for invoices, not for bills. Use ">"
            for discount applied after tax, "=" for discount and tax applied before tax, and
            "<", blank or anything else for discount applied before tax.

    * discount - Amount or percentage of discount. Optional. Only relevant for invoices, not
            for bills

    * taxable - Is this entry taxable? Optional. Use "Y" or "X" for yes, "N" or blank for no.

    * taxincluded - Is tax included in the item price? Optional. Use "Y" or "X" for yes, "N"
            or blank for no.

    * tax_table - Tax table. Optional. If the tax table provided does not exist, it will be
            blank in the invoice.

    * date_posted - Date posted. Optional. Use the same date format as defined in Preferences.
            If you provide a date posted for the first row of an invoice, GnuCash will attempt
            to also post the invoice (as opposed to only saving or updating it).

    * due_date - Due date. Optional. Use the same date format as defined in Preferences.
            Defaulted to date posted, if left blank. Only relevant in the first row of an
            invoice, if the invoice is posted.

    * account_posted - Post to account, for vendor or customer posting. Only mandatory in the
            first row of an invoice, if the invoice is posted.

    * memo_posted - Memo. Optional. Only relevant in the first row of an invoice, if the
            invoice is posted.

    * accu_splits - Accumulate splits? Optional. Use "Y" or "X" for yes, "N" or blank for no.
            Only relevant in the first row of an invoice, if the invoice is posted. If you use
            a spreadsheet program to create the import file, it is advised not to use blank for
            no, because a final column with only blanks may not be recognized as relevant data
            when the spreadsheet program creates the csv file.