Added the Invoice Modal.
This commit is contained in:
parent
b5adab5786
commit
9033ae9d79
5 changed files with 419 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ const FRAPPE_PROXY_METHOD = "custom_ui.api.proxy.request";
|
|||
const FRAPPE_UPSERT_CLIENT_METHOD = "custom_ui.api.db.upsert_client";
|
||||
const FRAPPE_UPSERT_ESTIMATE_METHOD = "custom_ui.api.db.upsert_estimate";
|
||||
const FRAPPE_UPSERT_JOB_METHOD = "custom_ui.api.db.upsert_job";
|
||||
const FRAPPE_UPSERT_INVOICE_METHOD = "custom_ui.api.db.upsert_invoice";
|
||||
|
||||
class Api {
|
||||
static async request(frappeMethod, args = {}) {
|
||||
|
|
@ -425,6 +426,13 @@ class Api {
|
|||
return result
|
||||
}
|
||||
|
||||
static async createInvoice(invoiceData) {
|
||||
const payload = DataUtils.toSnakeCaseObject(invoiceData);
|
||||
const result = await this.request(FRAPPE_UPSERT_INVOICE_METHOD, { data: payload });
|
||||
console.log("DEBUG: API - Created Invoice: ", result);
|
||||
return result
|
||||
}
|
||||
|
||||
// External API calls
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue