Salutation List
- Mr. (default for male)
- Ms. (default for female)
- Miss
- Mrs.
Customer Group Tree
All Customer Groups
- Commercial
- Government
- Individual
- Non Profit
Territory Tree
Make sure to have: Indonesia, as this is currently used (hardcoded) by Lovia Billing to create new Customer.
MongoDB Additional Fields
Collection | Field | Type | Description |
---|---|---|---|
user | customerId | String | Name of ERPNext Customer document |
Contact & Customer – Customizations
Note: The following doctype customization is done via custom app “lovia”.
Field | Type | Description | Used By |
---|---|---|---|
SSO ID (Contact.sso_id, Customer.sso_id) | String | Customer user ID in FusionAuth SSO | Lovia Billing |
Miluv v4 ID (Contact.miluv_v4_id, Customer.miluv_v4_id) | Integer | Miluv v4 user ID as 32-bit integer | Lovia Billing |
Lovia username (Contact.lovia_username, Customer.lovia_username) | String | Username used by Miluv and Lovia | Lovia Billing |
Subscriptions
Subscription Plan | Cost Center |
---|---|
Miluv Plus – Lifetime | |
Miluv Plus – Bonus (not yet used, because: You can only have Plans with the same billing cycle in a Subscription) | |
Miluv Silver – 3 months | Love Counseling – L |
Miluv Silver – 6 months | Love Counseling – L |
Miluv Silver – 1 year | Love Counseling – L |
Miluv Silver – 2 years | Love Counseling – L |
Miluv Silver – 3 years | Love Counseling – L |
Miluv Silver – 5 years | Love Counseling – L |
Important:
- You must already have an active Fiscal Year at the transaction date, otherwise transaction will fail immediately.
- Make sure your items has an Item Price with proper Valid From, otherwise price will be 0.
For subscriptions, technically we should use ERPNext Subscriptions and Subscription Plan, but this seems to require deeper integration than directly creating Sales Invoice and Payment Entry. To execute Subscriptions > Fetch Updates, you need to set at least Company’s Default Income Account (4110.xxx).
Watch out of bug #23681. Workaround: In the Subscription Plan, use Price List, then set the price using Item > Item Price. This means that each subscription plan needs to have its own Item.
Based on Subscription Form UI, to call Fetch Subscription Updates via REST API, POST to https://erp-staging.lovia.life/api/method/erpnext.accounts.doctype.subscription.subscription.get_subscription_updates. This is implemented by erpnext/erpnext/accounts/doctype/subscription/subscription.py which calls Subscription::process().
Curiously, it is able to refresh the form UI, not like when we used custom Server Action. Probably because it uses JavaScript frm.add_custom_button()
instead:
refresh: function(frm) {
...
frm.add_custom_button(
__('Fetch Subscription Updates'),
() => frm.events.get_subscription_updates(frm)
);
...
},
Input is JSON object of subscription name:
{
"name": "ACC-SUB-2020-00001"
}
Successful response is always {}
.
The problem with Subscription is you can only customize discount per subscription, but can’t customize the invoice amount on a per-invoice basis, so you’ll need to account for that during Payment Entry (deduction).