ERPNext
With ERPNext as the leading system, vendors, accounts, cost centers and modes of payment come from ERPNext. fineelik reads the invoices, you review and approve them, and fineelik posts them in ERPNext as a purchase invoice with the document attached. Once the invoice is paid in ERPNext, it is paid in fineelik as well.
fineelik only uses the standard interface of ERPNext. No app of its own is needed in ERPNext. ERPNext must be reachable from the internet (cloud or your own server with an https address).
Prerequisites in ERPNext
Section titled “Prerequisites in ERPNext”- A separate user for fineelik. It needs read access to Company, Supplier, Supplier Group, Bank Account, Account, Cost Center, Mode of Payment, Country, Address, Contact and Purchase Invoice, and the right to create suppliers and purchase invoices and to submit purchase invoices. So that Create vendor in the review also creates the address and bank account in ERPNext, it also needs the right to create Address, Bank Account and Bank. For the payment date fineelik also reads the payment ledger (Payment Ledger Entry) if the user may read it.
- API key and API secret of this user. You generate them in ERPNext on the user under “API Access”.
- Custom fields (recommended). fineelik writes to these fields if they exist:
| Field in ERPNext | DocType | Purpose |
|---|---|---|
custom_fineelik_purchase_key |
Purchase Invoice | fineelik invoice ID, unique: never an invoice twice |
custom_fineelik_supplier_id |
Supplier | fineelik vendor ID, unique |
custom_fineelik_fiscal_number |
Purchase Invoice | fiscal number of the vendor (cash receipt) |
custom_fineelik_fixed_asset |
Purchase Invoice | fixed asset flag |
custom_fineelik_withholding_tax |
Purchase Invoice | withholding tax flag |
custom_fineelik_draft_reason |
Purchase Invoice | why the invoice is a draft |
Without custom_fineelik_purchase_key, fineelik recognizes an invoice it already sent only by vendor and invoice number. Check connection shows which fields are missing.
Fiscal number from the document: On Bosnian fiscal receipts, fineelik reads the number after “BF”, “Broj fiskalnog računa” or “Fiskalni broj” and suggests it in the header field Fiscal number if ERPNext has the field custom_fineelik_fiscal_number. In the review, the field shows how confidently the number was read. You can change or clear it. The invoice number stays the printed number of the invoice; the fiscal number is added to it.
Connect
Section titled “Connect”- Open Settings, Leading system and choose ERPNext as the type. If Business Central was connected, fineelik first asks whether to remove that connection: a company has exactly one leading system.
- In the dialog Connect ERPNext, enter the Address of the instance (https), the API key and the API secret, and click Save and check.
- The check reports the API user, the companies in ERPNext, missing custom fields and missing read access. If there is only one company, fineelik chooses it itself. Otherwise choose it on the card Posting in ERPNext.
- Click Sync. Afterwards vendors, accounts, cost centers and modes of payment are in fineelik.
The key is stored encrypted in the database and never appears in plain text again. Edit credentials replaces it.
The sync fetches:
- Vendors with name, tax number (13 digits count as JIB, anything else as VAT ID or PDV number), country, currency, e-mail and block. With ERPNext these data are read-only in fineelik, as with Business Central. If ERPNext keeps the VAT ID in a field of its own (setting Field for the VAT ID of domestic vendors, in Bosnia and Herzegovina the field of the PDV number), the VAT ID comes from that field and the tax number from the tax ID. Create vendor then writes new domestic vendors the same way: the JIB into the tax ID, the PDV number into the field. Foreign vendors keep the VAT ID in the tax ID.
- Bank details of the vendors (Bank Account). A changed IBAN only takes effect once a second person confirms it.
- Accounts: expense accounts and fixed asset accounts of the chosen company, without groups.
- Cost centers of the company.
- Modes of payment. You assign them under Settings, Payment methods to each payment method as the ERP code.
It runs every night at 03:30 and at the push of a button. Under Automatic sync you can also set an interval of 15 to 120 minutes. At the same time the sync fetches the payment status of the invoices sent.
The ERPNext card shows the time under Last sync and below it the Result: in your language, for example “0 new vendors, 1 updated, 34 accounts, 2 cost centers, 5 modes of payment”, plus paid invoices and errors if there were any. If a sync fails, the reason is shown there. Notes about vendors, bank details and accounts from ERPNext call the system “ERP”, for example “From the ERP”.
Posting in ERPNext
Section titled “Posting in ERPNext”On the card Posting in ERPNext you set:
- Company in ERPNext: the company the invoices are posted in.
- Approved invoices: Post (default) or Always create as draft.
- Posting date: Invoice date (default) or Day of approval.
- Send approved invoices automatically and Approvals from: a new connection only sends approvals from the day of the connection. If you capture older invoices later, set the date back or send them one by one on the invoice.
- Number series for invoices and Number series for credit notes: the series from ERPNext, for example UF.YY.#### and UKO.YY.####. With ERPNext default, ERPNext decides.
- Supplier group domestic and Supplier group foreign: for vendors that fineelik creates in ERPNext.
- Item for the lines: a service without stock. No item sends only the description.
- Input VAT: Not deductible posts the gross amount to expense, without a tax row (for example without VAT registration). Deductible posts net and the tax per rate to the Input VAT account.
- Preset withholding tax for vendors from abroad: the review then shows Check withholding tax ticked. You can untick it.
- Check fixed asset from and Accounts: a line from this amount (company currency) on one of the accounts listed stays a draft.
What fineelik creates in ERPNext
Section titled “What fineelik creates in ERPNext”- Vendor: fineelik takes the linked vendor or looks it up by the fineelik vendor ID and the tax number. If it finds none, it creates one: name, supplier group domestic or foreign, country, currency, tax number and the fineelik vendor ID. For a foreign currency it uses the payable account of that currency if there is exactly one. From then on ERPNext keeps the vendor.
- Purchase invoice: the vendor’s invoice number and date, posting date, due date (never before the posting date), currency and exchange rate, one line per booking line with account and cost center, the mode of payment from the payment method, the booking text as remarks and the fiscal number. Credit notes go as a return (quantity -1) into the number series for credit notes. fineelik offsets a negative line in an invoice, for example a credit, against the line with the same account and cost center, because ERPNext does not accept negative lines in an invoice. Without such a line, fineelik sends nothing and names the problem. If a receipt has no invoice number, fineelik uses “BF” and the fiscal number as the invoice number. The invoice’s due date applies even if the vendor’s payment terms in ERPNext are shorter. If the invoice has no due date, ERPNext uses the payment terms.
- Exchange rate: 1 for the same currency, euro and convertible mark fixed at 1.95583. Other currencies get the rate from fineelik as a proposal and stay drafts so that accounting checks it.
- Document: the original PDF as a private attachment.
If fineelik finds problems beforehand, for example an account that does not exist in ERPNext or lines that do not add up to the gross amount, it sends nothing and names the problem on the invoice. A rounding difference of up to 0.10 is evened out on the largest line.
Create a vendor from the review
Section titled “Create a vendor from the review”If neither fineelik nor ERPNext knows the vendor of an invoice, create it in the review with Create vendor, on the web and in the fineelik app. fineelik creates it in ERPNext right away, with the same rules as for posting (supplier group, country, currency, tax number), plus the billing address and the chosen IBAN as a bank account. fineelik finds the bank by its BIC. If the vendor already exists in ERPNext (same name or same tax number), fineelik links it instead of creating a second one. If it is already linked there to another vendor of this company, fineelik does not create a second one and names the existing one. With ERPNext this is the only way to a new vendor: under Settings, Vendors there is no Add vendor, and the CSV import creates no new ones.
- If ERPNext rejects the vendor, nothing is created in fineelik either. The message names the reason.
- If ERPNext only rejects the address or the bank account, the vendor stays created and assigned. fineelik tells you what to add in ERPNext.
- With the four-eyes principle in the company, fineelik does not create a bank account. Enter the IBAN in ERPNext; the next sync brings it.
- fineelik posts the first invoice of a vendor created this way directly, without the draft new vendor.
Posted or draft
Section titled “Posted or draft”Approved invoices are posted. They stay a draft for:
- new vendor (fineelik created it while posting),
- fixed asset (the account is a fixed asset account),
- check fixed asset (amount and account as set),
- check withholding tax (ticked in the review),
- check exchange rate (foreign currency without a fixed rate),
- paid privately, clarify the payment way (payment method Private without an ERP code: without a mode of payment ERPNext would keep the invoice open with the vendor),
- paid in cash, fiscal number missing (payment method Cash without a fiscal number, if ERPNext has the field
custom_fineelik_fiscal_number; accounting decides whether the fiscal receipt is needed), - the setting Always create as draft.
Accounting checks and posts the draft in ERPNext. fineelik sees this with the next payment status and then shows the invoice as posted.
State on the invoice
Section titled “State on the invoice”On the invoice, the section ERPNext shows what happened: posted with document number (link to ERPNext), draft with reason, error with the message from ERPNext and the next attempt, cancelled or deleted in ERPNext. Whoever may create handovers (accounting, administrator) sees Send now, Send again or Check again and post.
fineelik sends automatically every two minutes. After an error from ERPNext it tries again later, with a growing interval. A problem in the data is checked again every hour until you have fixed it in the review.
After ten attempts without the button, fineelik stops. The invoice then shows: “fineelik no longer retries automatically. Please fix the cause and send again.” Send again starts counting from the beginning. If a transfer is interrupted, for example by a restart, fineelik ends it as an error after 15 minutes and tries again. While a transfer is running, the section shows “The transfer to ERPNext is running.” without a button.
Payment status
Section titled “Payment status”Every 15 minutes and with Sync, fineelik reads the state of the invoices sent:
- Paid in ERPNext: the invoice is paid in fineelik, with the payment date according to ERPNext. This works like “Already paid”, with the payment method of the invoice or the default of the company.
- Posted: a draft that accounting has posted.
- Cancelled: cancelled in ERPNext.
- Missing in ERPNext: a deleted draft. Send again creates it anew.
The card Transfer counts Posted, Paid, Draft and Error and lists errors and drafts with links to the invoice and to ERPNext. For an error without a further attempt it shows “fineelik no longer retries automatically. Send again from the invoice.”
Remove the connection
Section titled “Remove the connection”Remove connection in the danger zone deletes the API key. fineelik then no longer sends and no longer syncs. Vendors, accounts and learned rules stay, and so do the invoices in ERPNext. If you connect again, fineelik recognizes invoices already sent by the fineelik invoice ID and does not create them twice.