IO-3065 All manual toggle to include $0 line in part status count.
This commit is contained in:
@@ -6369,6 +6369,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>md_parts_scan</name>
|
<name>md_parts_scan</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>caseInsensitive</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>expression</name>
|
<name>expression</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -6390,6 +6411,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>field</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>flags</name>
|
<name>flags</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -6411,6 +6453,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>operation</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>value</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>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
@@ -11987,6 +12071,158 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>operations</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>contains</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>ends_with</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>equals</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>greater_than</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>less_than</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>not_equals</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>starts_with</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>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>successes</name>
|
<name>successes</name>
|
||||||
<children>
|
<children>
|
||||||
@@ -23131,6 +23367,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>alt_partno</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>amount</name>
|
<name>amount</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -23236,6 +23493,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>include_in_part_cnt</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>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>lbr_types</name>
|
<name>lbr_types</name>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -192,6 +192,23 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
|
|||||||
<Form.Item label={t("joblines.fields.tax_part")} name="tax_part" valuePropName="checked" initialValue={true}>
|
<Form.Item label={t("joblines.fields.tax_part")} name="tax_part" valuePropName="checked" initialValue={true}>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item dependencies={[["act_price"]]} noStyle>
|
||||||
|
{() => {
|
||||||
|
if (form.getFieldValue("act_price") === 0) {
|
||||||
|
return (
|
||||||
|
<Form.Item
|
||||||
|
label={t("joblines.fields.include_in_part_cnt")}
|
||||||
|
name="include_in_part_cnt"
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -238,6 +238,7 @@ export const UPDATE_JOB_LINE = gql`
|
|||||||
convertedtolbr
|
convertedtolbr
|
||||||
convertedtolbr_data
|
convertedtolbr_data
|
||||||
assigned_team
|
assigned_team
|
||||||
|
include_in_part_cnt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -581,6 +581,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
status
|
status
|
||||||
tax_part
|
tax_part
|
||||||
unq_seq
|
unq_seq
|
||||||
|
include_in_part_cnt
|
||||||
}
|
}
|
||||||
kmin
|
kmin
|
||||||
kmout
|
kmout
|
||||||
|
|||||||
@@ -256,16 +256,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bodyshop": {
|
"bodyshop": {
|
||||||
"operations": {
|
"actions": {
|
||||||
"starts_with": "Starts With",
|
|
||||||
"contains": "Contains",
|
|
||||||
"ends_with": "Ends With",
|
|
||||||
"equals": "Equals",
|
|
||||||
"not_equals": "Not Equals",
|
|
||||||
"greater_than": "Greater Than",
|
|
||||||
"less_than": "Less Than"
|
|
||||||
},
|
|
||||||
"actions": {
|
|
||||||
"add_task_preset": "Add Task Preset",
|
"add_task_preset": "Add Task Preset",
|
||||||
"addapptcolor": "Add Appointment Color",
|
"addapptcolor": "Add Appointment Color",
|
||||||
"addbucket": "Add Definition",
|
"addbucket": "Add Definition",
|
||||||
@@ -388,10 +379,12 @@
|
|||||||
"md_lost_sale_reasons": "Lost Sale Reasons",
|
"md_lost_sale_reasons": "Lost Sale Reasons",
|
||||||
"md_parts_order_comment": "Parts Orders Comments",
|
"md_parts_order_comment": "Parts Orders Comments",
|
||||||
"md_parts_scan": {
|
"md_parts_scan": {
|
||||||
|
"caseInsensitive": "Case Insensitive",
|
||||||
|
"expression": "",
|
||||||
"field": "Field",
|
"field": "Field",
|
||||||
"operation": "Operation",
|
"flags": "",
|
||||||
"value": "Value",
|
"operation": "Operation",
|
||||||
"caseInsensitive": "Case Insensitive"
|
"value": "Value"
|
||||||
},
|
},
|
||||||
"md_payment_types": "Payment Types",
|
"md_payment_types": "Payment Types",
|
||||||
"md_referral_sources": "Referral Sources",
|
"md_referral_sources": "Referral Sources",
|
||||||
@@ -721,6 +714,15 @@
|
|||||||
"task-presets": "Task Presets",
|
"task-presets": "Task Presets",
|
||||||
"workingdays": "Working Days"
|
"workingdays": "Working Days"
|
||||||
},
|
},
|
||||||
|
"operations": {
|
||||||
|
"contains": "Contains",
|
||||||
|
"ends_with": "Ends With",
|
||||||
|
"equals": "Equals",
|
||||||
|
"greater_than": "Greater Than",
|
||||||
|
"less_than": "Less Than",
|
||||||
|
"not_equals": "Not Equals",
|
||||||
|
"starts_with": "Starts With"
|
||||||
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"areyousure": "Are you sure you want to continue?",
|
"areyousure": "Are you sure you want to continue?",
|
||||||
"defaultviewcreated": "Default view created successfully.",
|
"defaultviewcreated": "Default view created successfully.",
|
||||||
@@ -1434,11 +1436,13 @@
|
|||||||
"act_price_before_ppc": "Original Part Price",
|
"act_price_before_ppc": "Original Part Price",
|
||||||
"adjustment": "Adjustment",
|
"adjustment": "Adjustment",
|
||||||
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
|
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
|
||||||
|
"alt_partno": "Alt Part #",
|
||||||
"amount": "Amount",
|
"amount": "Amount",
|
||||||
"assigned_team": "Team",
|
"assigned_team": "Team",
|
||||||
"assigned_team_name": "Team {{name}}",
|
"assigned_team_name": "Team {{name}}",
|
||||||
"create_ppc": "Create PPC?",
|
"create_ppc": "Create PPC?",
|
||||||
"db_price": "List Price",
|
"db_price": "List Price",
|
||||||
|
"include_in_part_cnt": "Include in Parts Status Count",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "LA1",
|
"LA1": "LA1",
|
||||||
"LA2": "LA2",
|
"LA2": "LA2",
|
||||||
@@ -1463,7 +1467,6 @@
|
|||||||
"mod_lbr_ty": "Labor Type",
|
"mod_lbr_ty": "Labor Type",
|
||||||
"notes": "Notes",
|
"notes": "Notes",
|
||||||
"oem_partno": "OEM Part #",
|
"oem_partno": "OEM Part #",
|
||||||
"alt_partno": "Alt Part #",
|
|
||||||
"op_code_desc": "Op Code Description",
|
"op_code_desc": "Op Code Description",
|
||||||
"part_qty": "Qty.",
|
"part_qty": "Qty.",
|
||||||
"part_type": "Part Type",
|
"part_type": "Part Type",
|
||||||
|
|||||||
@@ -256,16 +256,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bodyshop": {
|
"bodyshop": {
|
||||||
"operations": {
|
"actions": {
|
||||||
"starts_with": "",
|
|
||||||
"contains": "",
|
|
||||||
"ends_with": "",
|
|
||||||
"equals": "",
|
|
||||||
"not_equals": "",
|
|
||||||
"greater_than": "",
|
|
||||||
"less_than": ""
|
|
||||||
},
|
|
||||||
"actions": {
|
|
||||||
"add_task_preset": "",
|
"add_task_preset": "",
|
||||||
"addapptcolor": "",
|
"addapptcolor": "",
|
||||||
"addbucket": "",
|
"addbucket": "",
|
||||||
@@ -388,10 +379,12 @@
|
|||||||
"md_lost_sale_reasons": "",
|
"md_lost_sale_reasons": "",
|
||||||
"md_parts_order_comment": "",
|
"md_parts_order_comment": "",
|
||||||
"md_parts_scan": {
|
"md_parts_scan": {
|
||||||
|
"caseInsensitive": "",
|
||||||
|
"expression": "",
|
||||||
"field": "",
|
"field": "",
|
||||||
|
"flags": "",
|
||||||
"operation": "",
|
"operation": "",
|
||||||
"value": "",
|
"value": ""
|
||||||
"caseInsensitive": ""
|
|
||||||
},
|
},
|
||||||
"md_payment_types": "",
|
"md_payment_types": "",
|
||||||
"md_referral_sources": "",
|
"md_referral_sources": "",
|
||||||
@@ -721,6 +714,15 @@
|
|||||||
"task-presets": "",
|
"task-presets": "",
|
||||||
"workingdays": ""
|
"workingdays": ""
|
||||||
},
|
},
|
||||||
|
"operations": {
|
||||||
|
"contains": "",
|
||||||
|
"ends_with": "",
|
||||||
|
"equals": "",
|
||||||
|
"greater_than": "",
|
||||||
|
"less_than": "",
|
||||||
|
"not_equals": "",
|
||||||
|
"starts_with": ""
|
||||||
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"areyousure": "",
|
"areyousure": "",
|
||||||
"defaultviewcreated": "",
|
"defaultviewcreated": "",
|
||||||
@@ -1434,11 +1436,13 @@
|
|||||||
"act_price_before_ppc": "",
|
"act_price_before_ppc": "",
|
||||||
"adjustment": "",
|
"adjustment": "",
|
||||||
"ah_detail_line": "",
|
"ah_detail_line": "",
|
||||||
|
"alt_partno": "",
|
||||||
"amount": "",
|
"amount": "",
|
||||||
"assigned_team": "",
|
"assigned_team": "",
|
||||||
"assigned_team_name": "",
|
"assigned_team_name": "",
|
||||||
"create_ppc": "",
|
"create_ppc": "",
|
||||||
"db_price": "Precio de base de datos",
|
"db_price": "Precio de base de datos",
|
||||||
|
"include_in_part_cnt": "",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "",
|
"LA1": "",
|
||||||
"LA2": "",
|
"LA2": "",
|
||||||
@@ -1463,8 +1467,7 @@
|
|||||||
"mod_lbr_ty": "Tipo de trabajo",
|
"mod_lbr_ty": "Tipo de trabajo",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"oem_partno": "OEM parte #",
|
"oem_partno": "OEM parte #",
|
||||||
"alt_partno": "",
|
"op_code_desc": "",
|
||||||
"op_code_desc": "",
|
|
||||||
"part_qty": "",
|
"part_qty": "",
|
||||||
"part_type": "Tipo de parte",
|
"part_type": "Tipo de parte",
|
||||||
"part_types": {
|
"part_types": {
|
||||||
|
|||||||
@@ -256,16 +256,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bodyshop": {
|
"bodyshop": {
|
||||||
"operations": {
|
"actions": {
|
||||||
"starts_with": "",
|
|
||||||
"contains": "",
|
|
||||||
"ends_with": "",
|
|
||||||
"equals": "",
|
|
||||||
"not_equals": "",
|
|
||||||
"greater_than": "",
|
|
||||||
"less_than": ""
|
|
||||||
},
|
|
||||||
"actions": {
|
|
||||||
"add_task_preset": "",
|
"add_task_preset": "",
|
||||||
"addapptcolor": "",
|
"addapptcolor": "",
|
||||||
"addbucket": "",
|
"addbucket": "",
|
||||||
@@ -388,10 +379,12 @@
|
|||||||
"md_lost_sale_reasons": "",
|
"md_lost_sale_reasons": "",
|
||||||
"md_parts_order_comment": "",
|
"md_parts_order_comment": "",
|
||||||
"md_parts_scan": {
|
"md_parts_scan": {
|
||||||
|
"caseInsensitive": "",
|
||||||
|
"expression": "",
|
||||||
"field": "",
|
"field": "",
|
||||||
|
"flags": "",
|
||||||
"operation": "",
|
"operation": "",
|
||||||
"value": "",
|
"value": ""
|
||||||
"caseInsensitive": ""
|
|
||||||
},
|
},
|
||||||
"md_payment_types": "",
|
"md_payment_types": "",
|
||||||
"md_referral_sources": "",
|
"md_referral_sources": "",
|
||||||
@@ -721,6 +714,15 @@
|
|||||||
"task-presets": "",
|
"task-presets": "",
|
||||||
"workingdays": ""
|
"workingdays": ""
|
||||||
},
|
},
|
||||||
|
"operations": {
|
||||||
|
"contains": "",
|
||||||
|
"ends_with": "",
|
||||||
|
"equals": "",
|
||||||
|
"greater_than": "",
|
||||||
|
"less_than": "",
|
||||||
|
"not_equals": "",
|
||||||
|
"starts_with": ""
|
||||||
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"areyousure": "",
|
"areyousure": "",
|
||||||
"defaultviewcreated": "",
|
"defaultviewcreated": "",
|
||||||
@@ -1434,11 +1436,13 @@
|
|||||||
"act_price_before_ppc": "",
|
"act_price_before_ppc": "",
|
||||||
"adjustment": "",
|
"adjustment": "",
|
||||||
"ah_detail_line": "",
|
"ah_detail_line": "",
|
||||||
|
"alt_partno": "",
|
||||||
"amount": "",
|
"amount": "",
|
||||||
"assigned_team": "",
|
"assigned_team": "",
|
||||||
"assigned_team_name": "",
|
"assigned_team_name": "",
|
||||||
"create_ppc": "",
|
"create_ppc": "",
|
||||||
"db_price": "Prix de la base de données",
|
"db_price": "Prix de la base de données",
|
||||||
|
"include_in_part_cnt": "",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "",
|
"LA1": "",
|
||||||
"LA2": "",
|
"LA2": "",
|
||||||
@@ -1463,8 +1467,7 @@
|
|||||||
"mod_lbr_ty": "Type de travail",
|
"mod_lbr_ty": "Type de travail",
|
||||||
"notes": "",
|
"notes": "",
|
||||||
"oem_partno": "Pièce OEM #",
|
"oem_partno": "Pièce OEM #",
|
||||||
"alt_partno": "",
|
"op_code_desc": "",
|
||||||
"op_code_desc": "",
|
|
||||||
"part_qty": "",
|
"part_qty": "",
|
||||||
"part_type": "Type de pièce",
|
"part_type": "Type de pièce",
|
||||||
"part_types": {
|
"part_types": {
|
||||||
|
|||||||
@@ -2997,6 +2997,7 @@
|
|||||||
- est_seq
|
- est_seq
|
||||||
- glass_flag
|
- glass_flag
|
||||||
- id
|
- id
|
||||||
|
- include_in_part_cnt
|
||||||
- ioucreated
|
- ioucreated
|
||||||
- jobid
|
- jobid
|
||||||
- lbr_amt
|
- lbr_amt
|
||||||
@@ -3066,6 +3067,7 @@
|
|||||||
- est_seq
|
- est_seq
|
||||||
- glass_flag
|
- glass_flag
|
||||||
- id
|
- id
|
||||||
|
- include_in_part_cnt
|
||||||
- ioucreated
|
- ioucreated
|
||||||
- jobid
|
- jobid
|
||||||
- lbr_amt
|
- lbr_amt
|
||||||
@@ -3146,6 +3148,7 @@
|
|||||||
- est_seq
|
- est_seq
|
||||||
- glass_flag
|
- glass_flag
|
||||||
- id
|
- id
|
||||||
|
- include_in_part_cnt
|
||||||
- ioucreated
|
- ioucreated
|
||||||
- jobid
|
- jobid
|
||||||
- lbr_amt
|
- lbr_amt
|
||||||
|
|||||||
@@ -39,50 +39,50 @@ END;
|
|||||||
$$;
|
$$;
|
||||||
CREATE FUNCTION public.assign_ro_number() RETURNS trigger
|
CREATE FUNCTION public.assign_ro_number() RETURNS trigger
|
||||||
LANGUAGE plpgsql
|
LANGUAGE plpgsql
|
||||||
AS $$
|
AS $$
|
||||||
begin
|
begin
|
||||||
IF NEW.converted = true and (new.ro_number is null or new.ro_number = '') THEN
|
IF NEW.converted = true and (new.ro_number is null or new.ro_number = '') THEN
|
||||||
UPDATE counters
|
UPDATE counters
|
||||||
SET count = count + 1 where shopid=new.shopid AND countertype = 'ronum'
|
SET count = count + 1 where shopid=new.shopid AND countertype = 'ronum'
|
||||||
RETURNING concat(prefix,count) into new.ro_number;
|
RETURNING concat(prefix,count) into new.ro_number;
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$;
|
||||||
CREATE FUNCTION public.audit_trigger() RETURNS trigger
|
CREATE FUNCTION public.audit_trigger() RETURNS trigger
|
||||||
LANGUAGE plpgsql SECURITY DEFINER
|
LANGUAGE plpgsql SECURITY DEFINER
|
||||||
AS $$
|
AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
shopid uuid ;
|
shopid uuid ;
|
||||||
email text;
|
email text;
|
||||||
BEGIN
|
BEGIN
|
||||||
select b.id, u.email INTO shopid, email from users u join associations a on u.email = a.useremail join bodyshops b on b.id = a.shopid where u.authid = current_setting('hasura.user', 't')::jsonb->>'x-hasura-user-id' and a.active = true;
|
select b.id, u.email INTO shopid, email from users u join associations a on u.email = a.useremail join bodyshops b on b.id = a.shopid where u.authid = current_setting('hasura.user', 't')::jsonb->>'x-hasura-user-id' and a.active = true;
|
||||||
IF TG_OP = 'INSERT'
|
IF TG_OP = 'INSERT'
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO public.audit_trail (tabname, schemaname, operation, new_val, recordid, bodyshopid, useremail)
|
INSERT INTO public.audit_trail (tabname, schemaname, operation, new_val, recordid, bodyshopid, useremail)
|
||||||
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(NEW), NEW.id, shopid, email);
|
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(NEW), NEW.id, shopid, email);
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
ELSIF TG_OP = 'UPDATE'
|
ELSIF TG_OP = 'UPDATE'
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, new_val, recordid, bodyshopid, useremail)
|
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, new_val, recordid, bodyshopid, useremail)
|
||||||
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP,
|
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP,
|
||||||
json_diff(to_jsonb(OLD), to_jsonb(NEW)) , json_diff(to_jsonb(NEW), to_jsonb(OLD)), OLD.id, shopid, email);
|
json_diff(to_jsonb(OLD), to_jsonb(NEW)) , json_diff(to_jsonb(NEW), to_jsonb(OLD)), OLD.id, shopid, email);
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
ELSIF TG_OP = 'DELETE'
|
ELSIF TG_OP = 'DELETE'
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, recordid, bodyshopid, useremail)
|
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, recordid, bodyshopid, useremail)
|
||||||
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(OLD), OLD.ID, shopid, email);
|
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(OLD), OLD.ID, shopid, email);
|
||||||
RETURN OLD;
|
RETURN OLD;
|
||||||
END IF;
|
END IF;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$;
|
||||||
CREATE FUNCTION public.json_diff(l jsonb, r jsonb) RETURNS jsonb
|
CREATE FUNCTION public.json_diff(l jsonb, r jsonb) RETURNS jsonb
|
||||||
LANGUAGE sql
|
LANGUAGE sql
|
||||||
AS $$
|
AS $$
|
||||||
SELECT jsonb_object_agg(a.key, a.value) FROM
|
SELECT jsonb_object_agg(a.key, a.value) FROM
|
||||||
( SELECT key, value FROM jsonb_each(l) ) a LEFT OUTER JOIN
|
( SELECT key, value FROM jsonb_each(l) ) a LEFT OUTER JOIN
|
||||||
( SELECT key, value FROM jsonb_each(r) ) b ON a.key = b.key
|
( SELECT key, value FROM jsonb_each(r) ) b ON a.key = b.key
|
||||||
WHERE a.value != b.value OR b.key IS NULL;
|
WHERE a.value != b.value OR b.key IS NULL;
|
||||||
$$;
|
$$;
|
||||||
CREATE TABLE public.bills (
|
CREATE TABLE public.bills (
|
||||||
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
||||||
@@ -211,33 +211,33 @@ CREATE TABLE public.exportlog (
|
|||||||
);
|
);
|
||||||
CREATE FUNCTION public.search_exportlog(search text) RETURNS SETOF public.exportlog
|
CREATE FUNCTION public.search_exportlog(search text) RETURNS SETOF public.exportlog
|
||||||
LANGUAGE plpgsql STABLE
|
LANGUAGE plpgsql STABLE
|
||||||
AS $$ BEGIN IF search = '' THEN RETURN query
|
AS $$ BEGIN IF search = '' THEN RETURN query
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
FROM
|
FROM
|
||||||
exportlog e;
|
exportlog e;
|
||||||
ELSE RETURN query
|
ELSE RETURN query
|
||||||
SELECT
|
SELECT
|
||||||
e.*
|
e.*
|
||||||
FROM
|
FROM
|
||||||
exportlog e
|
exportlog e
|
||||||
LEFT JOIN jobs j on j.id = e.jobid
|
LEFT JOIN jobs j on j.id = e.jobid
|
||||||
LEFT JOIN payments p
|
LEFT JOIN payments p
|
||||||
ON p.id = e.paymentid
|
ON p.id = e.paymentid
|
||||||
LEFT JOIN bills b
|
LEFT JOIN bills b
|
||||||
ON e.billid = b.id
|
ON e.billid = b.id
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
j.ro_number ILIKE '%' || search || '%'
|
j.ro_number ILIKE '%' || search || '%'
|
||||||
OR b.invoice_number ILIKE '%' || search || '%'
|
OR b.invoice_number ILIKE '%' || search || '%'
|
||||||
OR p.paymentnum ILIKE '%' || search || '%'
|
OR p.paymentnum ILIKE '%' || search || '%'
|
||||||
OR e.useremail ILIKE '%' || search || '%'
|
OR e.useremail ILIKE '%' || search || '%'
|
||||||
)
|
)
|
||||||
AND (e.jobid = j.id
|
AND (e.jobid = j.id
|
||||||
or e.paymentid = p.id
|
or e.paymentid = p.id
|
||||||
or e.billid = b.id)
|
or e.billid = b.id)
|
||||||
;
|
;
|
||||||
END IF;
|
END IF;
|
||||||
END $$;
|
END $$;
|
||||||
CREATE TABLE public.jobs (
|
CREATE TABLE public.jobs (
|
||||||
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."joblines" add column "include_in_part_cnt" boolean
|
||||||
|
-- not null default 'false';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."joblines" add column "include_in_part_cnt" boolean
|
||||||
|
not null default 'false';
|
||||||
10
hasura/migrations/1736890690896_run_sql_migration/down.sql
Normal file
10
hasura/migrations/1736890690896_run_sql_migration/down.sql
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
-- SELECT j.jobid,
|
||||||
|
-- j.status,
|
||||||
|
-- count(1) AS count,
|
||||||
|
-- j.part_type
|
||||||
|
-- FROM joblines j
|
||||||
|
-- WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.part_type <> 'PAS'::text) AND (j.part_type <> 'PASL'::text) AND ((j.part_qty)::numeric <> (0)::numeric) AND ((j.act_price <> (0)::numeric) OR (j.include_in_part_cnt is TRUE))AND (j.removed IS FALSE))
|
||||||
|
-- GROUP BY j.jobid, j.status, j.part_type;
|
||||||
8
hasura/migrations/1736890690896_run_sql_migration/up.sql
Normal file
8
hasura/migrations/1736890690896_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
SELECT j.jobid,
|
||||||
|
j.status,
|
||||||
|
count(1) AS count,
|
||||||
|
j.part_type
|
||||||
|
FROM joblines j
|
||||||
|
WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.part_type <> 'PAS'::text) AND (j.part_type <> 'PASL'::text) AND ((j.part_qty)::numeric <> (0)::numeric) AND ((j.act_price <> (0)::numeric) OR (j.include_in_part_cnt is TRUE))AND (j.removed IS FALSE))
|
||||||
|
GROUP BY j.jobid, j.status, j.part_type;
|
||||||
10
hasura/migrations/1736890701752_run_sql_migration/down.sql
Normal file
10
hasura/migrations/1736890701752_run_sql_migration/down.sql
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
-- SELECT j.jobid,
|
||||||
|
-- j.status,
|
||||||
|
-- count(1) AS count,
|
||||||
|
-- j.part_type
|
||||||
|
-- FROM joblines j
|
||||||
|
-- WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.part_type <> 'PAS'::text) AND (j.part_type <> 'PASL'::text) AND ((j.part_qty)::numeric <> (0)::numeric) AND ((j.act_price <> (0)::numeric) OR (j.include_in_part_cnt is TRUE))AND (j.removed IS FALSE))
|
||||||
|
-- GROUP BY j.jobid, j.status, j.part_type;
|
||||||
8
hasura/migrations/1736890701752_run_sql_migration/up.sql
Normal file
8
hasura/migrations/1736890701752_run_sql_migration/up.sql
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
CREATE OR REPLACE VIEW "public"."joblines_status" AS
|
||||||
|
SELECT j.jobid,
|
||||||
|
j.status,
|
||||||
|
count(1) AS count,
|
||||||
|
j.part_type
|
||||||
|
FROM joblines j
|
||||||
|
WHERE ((j.part_type IS NOT NULL) AND (j.part_type <> 'PAE'::text) AND (j.part_type <> 'PAS'::text) AND (j.part_type <> 'PASL'::text) AND ((j.part_qty)::numeric <> (0)::numeric) AND ((j.act_price <> (0)::numeric) OR (j.include_in_part_cnt is TRUE))AND (j.removed IS FALSE))
|
||||||
|
GROUP BY j.jobid, j.status, j.part_type;
|
||||||
@@ -39,50 +39,50 @@ END;
|
|||||||
$$;
|
$$;
|
||||||
CREATE FUNCTION public.assign_ro_number() RETURNS trigger
|
CREATE FUNCTION public.assign_ro_number() RETURNS trigger
|
||||||
LANGUAGE plpgsql
|
LANGUAGE plpgsql
|
||||||
AS $$
|
AS $$
|
||||||
begin
|
begin
|
||||||
IF NEW.converted = true and (new.ro_number is null or new.ro_number = '') THEN
|
IF NEW.converted = true and (new.ro_number is null or new.ro_number = '') THEN
|
||||||
UPDATE counters
|
UPDATE counters
|
||||||
SET count = count + 1 where shopid=new.shopid AND countertype = 'ronum'
|
SET count = count + 1 where shopid=new.shopid AND countertype = 'ronum'
|
||||||
RETURNING concat(prefix,count) into new.ro_number;
|
RETURNING concat(prefix,count) into new.ro_number;
|
||||||
END IF;
|
END IF;
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$;
|
||||||
CREATE FUNCTION public.audit_trigger() RETURNS trigger
|
CREATE FUNCTION public.audit_trigger() RETURNS trigger
|
||||||
LANGUAGE plpgsql SECURITY DEFINER
|
LANGUAGE plpgsql SECURITY DEFINER
|
||||||
AS $$
|
AS $$
|
||||||
DECLARE
|
DECLARE
|
||||||
shopid uuid ;
|
shopid uuid ;
|
||||||
email text;
|
email text;
|
||||||
BEGIN
|
BEGIN
|
||||||
select b.id, u.email INTO shopid, email from users u join associations a on u.email = a.useremail join bodyshops b on b.id = a.shopid where u.authid = current_setting('hasura.user', 't')::jsonb->>'x-hasura-user-id' and a.active = true;
|
select b.id, u.email INTO shopid, email from users u join associations a on u.email = a.useremail join bodyshops b on b.id = a.shopid where u.authid = current_setting('hasura.user', 't')::jsonb->>'x-hasura-user-id' and a.active = true;
|
||||||
IF TG_OP = 'INSERT'
|
IF TG_OP = 'INSERT'
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO public.audit_trail (tabname, schemaname, operation, new_val, recordid, bodyshopid, useremail)
|
INSERT INTO public.audit_trail (tabname, schemaname, operation, new_val, recordid, bodyshopid, useremail)
|
||||||
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(NEW), NEW.id, shopid, email);
|
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(NEW), NEW.id, shopid, email);
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
ELSIF TG_OP = 'UPDATE'
|
ELSIF TG_OP = 'UPDATE'
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, new_val, recordid, bodyshopid, useremail)
|
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, new_val, recordid, bodyshopid, useremail)
|
||||||
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP,
|
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP,
|
||||||
json_diff(to_jsonb(OLD), to_jsonb(NEW)) , json_diff(to_jsonb(NEW), to_jsonb(OLD)), OLD.id, shopid, email);
|
json_diff(to_jsonb(OLD), to_jsonb(NEW)) , json_diff(to_jsonb(NEW), to_jsonb(OLD)), OLD.id, shopid, email);
|
||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
ELSIF TG_OP = 'DELETE'
|
ELSIF TG_OP = 'DELETE'
|
||||||
THEN
|
THEN
|
||||||
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, recordid, bodyshopid, useremail)
|
INSERT INTO public.audit_trail (tabname, schemaname, operation, old_val, recordid, bodyshopid, useremail)
|
||||||
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(OLD), OLD.ID, shopid, email);
|
VALUES (TG_RELNAME, TG_TABLE_SCHEMA, TG_OP, row_to_json(OLD), OLD.ID, shopid, email);
|
||||||
RETURN OLD;
|
RETURN OLD;
|
||||||
END IF;
|
END IF;
|
||||||
END;
|
END;
|
||||||
$$;
|
$$;
|
||||||
CREATE FUNCTION public.json_diff(l jsonb, r jsonb) RETURNS jsonb
|
CREATE FUNCTION public.json_diff(l jsonb, r jsonb) RETURNS jsonb
|
||||||
LANGUAGE sql
|
LANGUAGE sql
|
||||||
AS $$
|
AS $$
|
||||||
SELECT jsonb_object_agg(a.key, a.value) FROM
|
SELECT jsonb_object_agg(a.key, a.value) FROM
|
||||||
( SELECT key, value FROM jsonb_each(l) ) a LEFT OUTER JOIN
|
( SELECT key, value FROM jsonb_each(l) ) a LEFT OUTER JOIN
|
||||||
( SELECT key, value FROM jsonb_each(r) ) b ON a.key = b.key
|
( SELECT key, value FROM jsonb_each(r) ) b ON a.key = b.key
|
||||||
WHERE a.value != b.value OR b.key IS NULL;
|
WHERE a.value != b.value OR b.key IS NULL;
|
||||||
$$;
|
$$;
|
||||||
CREATE TABLE public.bills (
|
CREATE TABLE public.bills (
|
||||||
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
||||||
@@ -211,33 +211,33 @@ CREATE TABLE public.exportlog (
|
|||||||
);
|
);
|
||||||
CREATE FUNCTION public.search_exportlog(search text) RETURNS SETOF public.exportlog
|
CREATE FUNCTION public.search_exportlog(search text) RETURNS SETOF public.exportlog
|
||||||
LANGUAGE plpgsql STABLE
|
LANGUAGE plpgsql STABLE
|
||||||
AS $$ BEGIN IF search = '' THEN RETURN query
|
AS $$ BEGIN IF search = '' THEN RETURN query
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
FROM
|
FROM
|
||||||
exportlog e;
|
exportlog e;
|
||||||
ELSE RETURN query
|
ELSE RETURN query
|
||||||
SELECT
|
SELECT
|
||||||
e.*
|
e.*
|
||||||
FROM
|
FROM
|
||||||
exportlog e
|
exportlog e
|
||||||
LEFT JOIN jobs j on j.id = e.jobid
|
LEFT JOIN jobs j on j.id = e.jobid
|
||||||
LEFT JOIN payments p
|
LEFT JOIN payments p
|
||||||
ON p.id = e.paymentid
|
ON p.id = e.paymentid
|
||||||
LEFT JOIN bills b
|
LEFT JOIN bills b
|
||||||
ON e.billid = b.id
|
ON e.billid = b.id
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
j.ro_number ILIKE '%' || search || '%'
|
j.ro_number ILIKE '%' || search || '%'
|
||||||
OR b.invoice_number ILIKE '%' || search || '%'
|
OR b.invoice_number ILIKE '%' || search || '%'
|
||||||
OR p.paymentnum ILIKE '%' || search || '%'
|
OR p.paymentnum ILIKE '%' || search || '%'
|
||||||
OR e.useremail ILIKE '%' || search || '%'
|
OR e.useremail ILIKE '%' || search || '%'
|
||||||
)
|
)
|
||||||
AND (e.jobid = j.id
|
AND (e.jobid = j.id
|
||||||
or e.paymentid = p.id
|
or e.paymentid = p.id
|
||||||
or e.billid = b.id)
|
or e.billid = b.id)
|
||||||
;
|
;
|
||||||
END IF;
|
END IF;
|
||||||
END $$;
|
END $$;
|
||||||
CREATE TABLE public.jobs (
|
CREATE TABLE public.jobs (
|
||||||
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user