diff --git a/src/routes/orders.ts b/src/routes/orders.ts index cee5de2..5ef355e 100644 --- a/src/routes/orders.ts +++ b/src/routes/orders.ts @@ -137,8 +137,8 @@ router.post('/orders', (req, res) => { const orderInfo = db .prepare( `INSERT INTO service_orders - (order_number, customer_id, clock_id, job_type, date_in, due_date, cust_po, terms) - VALUES (?, ?, ?, ?, ?, ?, ?, ?)` + (order_number, customer_id, clock_id, job_type, date_in, due_date, terms) + VALUES (?, ?, ?, ?, ?, ?, ?)` ) .run( orderNumber, @@ -147,7 +147,6 @@ router.post('/orders', (req, res) => { b.job_type || null, b.date_in || todayStr(), b.due_date || null, - b.cust_po || null, b.terms || null ); @@ -220,7 +219,7 @@ router.post('/orders/:id', (req, res) => { db.prepare( `UPDATE service_orders SET job_type = ?, status = ?, - date_out = ?, due_date = ?, cust_po = ?, terms = ?, internal_note = ?, + date_out = ?, due_date = ?, terms = ?, internal_note = ?, tax = ?, shipping = ?, pickup_delivery = ?, service_call = ?, disposal = ?, amount_paid = ? WHERE id = ?` ).run( @@ -228,7 +227,6 @@ router.post('/orders/:id', (req, res) => { STATUSES.includes(b.status) ? b.status : 'OPEN', b.date_out || null, b.due_date || null, - b.cust_po || null, b.terms || null, b.internal_note || null, parseCents(b.tax), diff --git a/src/schema.sql b/src/schema.sql index 0f38673..cee5af7 100644 --- a/src/schema.sql +++ b/src/schema.sql @@ -33,7 +33,6 @@ CREATE TABLE service_orders ( date_in TEXT DEFAULT (date('now')), date_out TEXT, due_date TEXT, - cust_po TEXT, terms TEXT, internal_note TEXT, -- staff-only; never printed on the invoice -- money summary (cents) diff --git a/src/views/invoice.njk b/src/views/invoice.njk index f319372..b691e83 100644 --- a/src/views/invoice.njk +++ b/src/views/invoice.njk @@ -42,7 +42,6 @@
Job Type: {{ order.job_type or '' }}
- {% if order.cust_po %}PO: {{ order.cust_po }}
{% endif %} {% if order.terms %}Terms: {{ order.terms }}
{% endif %}