Merged in release/2023-02-17 (pull request #676)
Release/2023 02 17 Approved-by: Patrick Fic
This commit is contained in:
@@ -289,7 +289,7 @@ export function JobLinesUpsertModalComponent({
|
||||
name="prt_dsmk_p"
|
||||
initialValue={0}
|
||||
>
|
||||
<InputNumber precision={0} min={0} max={100} />
|
||||
<InputNumber precision={0} min={-100} max={100} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("joblines.fields.tax_part")}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { selectJobLineEditModal } from "../../redux/modals/modals.selectors";
|
||||
import UndefinedToNull from "../../utils/undefinedtonull";
|
||||
import JobLinesUpdsertModal from "./job-lines-upsert-modal.component";
|
||||
import Axios from "axios";
|
||||
import Dinero from "dinero.js";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
jobLineEditModal: selectJobLineEditModal,
|
||||
});
|
||||
@@ -40,7 +41,15 @@ function JobLinesUpsertModalContainer({
|
||||
manual_line: !(
|
||||
jobLineEditModal.context && jobLineEditModal.context.id
|
||||
),
|
||||
...UndefinedToNull(values),
|
||||
...UndefinedToNull({
|
||||
...values,
|
||||
prt_dsmk_m: Dinero({
|
||||
amount: Math.round(values.act_price * 100),
|
||||
})
|
||||
.percentage(Math.abs(values.prt_dsmk_p || 0))
|
||||
.multiply(values.prt_dsmk_p >= 0 ? 1 : -1)
|
||||
.toFormat(0.0),
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -68,7 +77,15 @@ function JobLinesUpsertModalContainer({
|
||||
const r = await updateJobLine({
|
||||
variables: {
|
||||
lineId: jobLineEditModal.context.id,
|
||||
line: values,
|
||||
line: {
|
||||
...values,
|
||||
prt_dsmk_m: Dinero({
|
||||
amount: Math.round(values.act_price * 100),
|
||||
})
|
||||
.percentage(Math.abs(values.prt_dsmk_p || 0))
|
||||
.multiply(values.prt_dsmk_p >= 0 ? 1 : -1)
|
||||
.toFormat(0.0),
|
||||
},
|
||||
},
|
||||
refetchQueries: ["GET_LINE_TICKET_BY_PK"],
|
||||
});
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."jobs_idx_date_open";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "jobs_idx_date_open" on
|
||||
"public"."jobs" using btree ("date_open");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."jobs_idx_date_invoiced";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "jobs_idx_date_invoiced" on
|
||||
"public"."jobs" using btree ("date_invoiced");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_bills_vendorid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_bills_vendorid" on
|
||||
"public"."bills" using btree ("vendorid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_parts_orders_vendorid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_parts_orders_vendorid" on
|
||||
"public"."parts_orders" using btree ("vendorid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_ccc_jobid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_ccc_jobid" on
|
||||
"public"."cccontracts" using btree ("jobid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_ccc_courtesycarid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_ccc_courtesycarid" on
|
||||
"public"."cccontracts" using btree ("courtesycarid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_jobs_actual_completion";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_jobs_actual_completion" on
|
||||
"public"."jobs" using btree ("actual_completion");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_jobs_actual_in";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_jobs_actual_in" on
|
||||
"public"."jobs" using btree ("actual_in");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_jobs_employee_csr";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_jobs_employee_csr" on
|
||||
"public"."jobs" using btree ("employee_csr");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_jobs_body_csr";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_jobs_body_csr" on
|
||||
"public"."jobs" using btree ("employee_body");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_jobs_employee_refinish";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_jobs_employee_refinish" on
|
||||
"public"."jobs" using btree ("employee_refinish");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_timetickets_employeeid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_timetickets_employeeid" on
|
||||
"public"."timetickets" using btree ("employeeid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_timetickets_cost_center";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_timetickets_cost_center" on
|
||||
"public"."timetickets" using btree ("cost_center");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_scoreboard_jobid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_scoreboard_jobid" on
|
||||
"public"."scoreboard" using btree ("jobid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_scoreboard_date";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_scoreboard_date" on
|
||||
"public"."scoreboard" using btree ("date");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_payments_date";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_payments_date" on
|
||||
"public"."payments" using btree ("date");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."exportlog_createdat";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "exportlog_createdat" on
|
||||
"public"."exportlog" using btree ("created_at");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_transitions_jobid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_transitions_jobid" on
|
||||
"public"."transitions" using btree ("jobid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_transitions_start";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_transitions_start" on
|
||||
"public"."transitions" using btree ("start");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_transitions_end";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_transitions_end" on
|
||||
"public"."transitions" using btree ("end");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_audit_bodyshopid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_audit_bodyshopid" on
|
||||
"public"."audit_trail" using btree ("bodyshopid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_audit_jobid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_audit_jobid" on
|
||||
"public"."audit_trail" using btree ("jobid");
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX IF EXISTS "public"."idx_audit_billid";
|
||||
@@ -0,0 +1,2 @@
|
||||
CREATE INDEX "idx_audit_billid" on
|
||||
"public"."audit_trail" using btree ("billid");
|
||||
Reference in New Issue
Block a user