remove po
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<div>
|
||||
<h2>Order Info</h2>
|
||||
<p>Job Type: {{ order.job_type or '' }}</p>
|
||||
{% if order.cust_po %}<p>PO: {{ order.cust_po }}</p>{% endif %}
|
||||
{% if order.terms %}<p>Terms: {{ order.terms }}</p>{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<label>Date in <input type="text" value="{{ order.date_in or '' }}" disabled></label>
|
||||
<label>Date out <input type="date" name="date_out" value="{{ order.date_out or '' }}"></label>
|
||||
<label>Due date <input type="date" name="due_date" value="{{ order.due_date or '' }}"></label>
|
||||
<label>Customer PO <input type="text" name="cust_po" value="{{ order.cust_po or '' }}"></label>
|
||||
<label>Terms <input type="text" name="terms" value="{{ order.terms or '' }}"></label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
</label>
|
||||
<label>Date in <input type="date" name="date_in" value="{{ today }}"></label>
|
||||
<label>Due date <input type="date" name="due_date"></label>
|
||||
<label>Customer PO <input type="text" name="cust_po"></label>
|
||||
<label>Terms <input type="text" name="terms"></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user