Update parts return pricing error IO-684

This commit is contained in:
Patrick Fic
2021-02-16 14:35:42 -08:00
parent 5b5cf579b8
commit 930d9fe7dc
12 changed files with 94 additions and 7 deletions

View File

@@ -1248,6 +1248,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>location</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node> <concept_node>
<name>quantity</name> <name>quantity</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>

View File

@@ -275,8 +275,8 @@ export function BillsListTableComponent({
.map((i) => { .map((i) => {
return { return {
line_desc: i.line_desc, line_desc: i.line_desc,
db_price: i.actual_price, // db_price: i.actual_price,
act_price: i.actual_cost, act_price: i.actual_price,
quantity: i.quantity, quantity: i.quantity,
joblineid: i.joblineid, joblineid: i.joblineid,
}; };

View File

@@ -63,7 +63,7 @@ export default function PartsOrderModalComponent({
{fields.map((field, index) => ( {fields.map((field, index) => (
<Form.Item required={false} key={field.key}> <Form.Item required={false} key={field.key}>
<div style={{ display: "flex", alignItems: "center" }}> <div style={{ display: "flex", alignItems: "center" }}>
<LayoutFormRow grow style={{ flex: 1 }}> <LayoutFormRow style={{ flex: 1 }}>
<Form.Item <Form.Item
label={t("parts_orders.fields.line_desc")} label={t("parts_orders.fields.line_desc")}
key={`${index}line_desc`} key={`${index}line_desc`}
@@ -84,7 +84,13 @@ export default function PartsOrderModalComponent({
> >
<Input /> <Input />
</Form.Item> </Form.Item>
<Form.Item
label={t("parts_orders.fields.db_price")}
key={`${index}db_price`}
name={[field.name, "db_price"]}
>
<CurrencyInput />
</Form.Item>
<Form.Item <Form.Item
label={t("parts_orders.fields.act_price")} label={t("parts_orders.fields.act_price")}
key={`${index}act_price`} key={`${index}act_price`}

View File

@@ -153,8 +153,8 @@ export function BillsListPage({
linesToOrder: record.billlines.map((i) => { linesToOrder: record.billlines.map((i) => {
return { return {
line_desc: i.line_desc, line_desc: i.line_desc,
db_price: i.actual_price, // db_price: i.actual_price,
act_price: i.actual_cost, act_price: i.actual_price,
quantity: i.quantity, quantity: i.quantity,
joblineid: i.joblineid, joblineid: i.joblineid,
}; };

View File

@@ -92,6 +92,7 @@
"jobline": "Job Line", "jobline": "Job Line",
"line_desc": "Line Description", "line_desc": "Line Description",
"local_tax_applicable": "Loc. Tax?", "local_tax_applicable": "Loc. Tax?",
"location": "Location",
"quantity": "Quantity", "quantity": "Quantity",
"state_tax_applicable": "St. Tax?" "state_tax_applicable": "St. Tax?"
}, },
@@ -99,7 +100,7 @@
"deductfromlabor": "Deduct from Labor?", "deductfromlabor": "Deduct from Labor?",
"entered": "Entered", "entered": "Entered",
"from": "From", "from": "From",
"other": "--Not On Estimate--", "other": "-- Not On Estimate --",
"reconciled": "Reconciled!", "reconciled": "Reconciled!",
"unreconciled": "Unreconciled" "unreconciled": "Unreconciled"
} }

View File

@@ -92,6 +92,7 @@
"jobline": "", "jobline": "",
"line_desc": "", "line_desc": "",
"local_tax_applicable": "", "local_tax_applicable": "",
"location": "",
"quantity": "", "quantity": "",
"state_tax_applicable": "" "state_tax_applicable": ""
}, },

View File

@@ -92,6 +92,7 @@
"jobline": "", "jobline": "",
"line_desc": "", "line_desc": "",
"local_tax_applicable": "", "local_tax_applicable": "",
"location": "",
"quantity": "", "quantity": "",
"state_tax_applicable": "" "state_tax_applicable": ""
}, },

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: alter table "public"."billlines" drop constraint "billlines_joblineid_fkey";
type: run_sql

View File

@@ -0,0 +1,10 @@
- args:
cascade: false
read_only: false
sql: |-
alter table "public"."billlines"
add constraint "billlines_joblineid_fkey"
foreign key ("joblineid")
references "public"."joblines"
("id") on update restrict on delete set null;
type: run_sql

View File

@@ -0,0 +1,12 @@
- args:
relationship: billlines
table:
name: joblines
schema: public
type: drop_relationship
- args:
relationship: jobline
table:
name: billlines
schema: public
type: drop_relationship

View File

@@ -0,0 +1,20 @@
- args:
name: billlines
table:
name: joblines
schema: public
using:
foreign_key_constraint_on:
column: joblineid
table:
name: billlines
schema: public
type: create_array_relationship
- args:
name: jobline
table:
name: billlines
schema: public
using:
foreign_key_constraint_on: joblineid
type: create_object_relationship

View File

@@ -367,6 +367,9 @@ tables:
- name: bill - name: bill
using: using:
foreign_key_constraint_on: billid foreign_key_constraint_on: billid
- name: jobline
using:
foreign_key_constraint_on: joblineid
insert_permissions: insert_permissions:
- role: user - role: user
permission: permission:
@@ -1798,6 +1801,13 @@ tables:
table: table:
schema: public schema: public
name: allocations name: allocations
- name: billlines
using:
foreign_key_constraint_on:
column: joblineid
table:
schema: public
name: billlines
- name: parts_order_lines - name: parts_order_lines
using: using:
foreign_key_constraint_on: foreign_key_constraint_on: