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>
</translations>
</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>
<name>quantity</name>
<definition_loaded>false</definition_loaded>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -92,6 +92,7 @@
"jobline": "",
"line_desc": "",
"local_tax_applicable": "",
"location": "",
"quantity": "",
"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
using:
foreign_key_constraint_on: billid
- name: jobline
using:
foreign_key_constraint_on: joblineid
insert_permissions:
- role: user
permission:
@@ -1798,6 +1801,13 @@ tables:
table:
schema: public
name: allocations
- name: billlines
using:
foreign_key_constraint_on:
column: joblineid
table:
schema: public
name: billlines
- name: parts_order_lines
using:
foreign_key_constraint_on: