This commit is contained in:
@@ -336,46 +336,45 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderItemLaborManualDiscountPct')"
|
v-if="form().showMe(this, 'LaborPrice')"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
lg="4"
|
lg="4"
|
||||||
xl="3"
|
xl="3"
|
||||||
>
|
>
|
||||||
<gz-percent
|
<gz-currency
|
||||||
v-model="
|
v-model="
|
||||||
value.items[activeWoItemIndex].labors[activeItemIndex]
|
value.items[activeWoItemIndex].labors[activeItemIndex].price
|
||||||
.manualDiscountPct
|
|
||||||
"
|
"
|
||||||
:readonly="formState.readOnly || isDeleted"
|
:readonly="formState.readOnly || isDeleted"
|
||||||
:disabled="isDeleted"
|
:disabled="isDeleted"
|
||||||
:label="$ay.t('WorkOrderItemLaborManualDiscountPct')"
|
:label="$ay.t('Price')"
|
||||||
:ref="
|
:ref="
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||||
"
|
"
|
||||||
data-cy="laborManualDiscountPct"
|
data-cy="laborprice"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
form().serverErrors(
|
form().serverErrors(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:rules="[
|
:rules="[
|
||||||
form().decimalValid(
|
form().decimalValid(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||||
),
|
),
|
||||||
form().required(
|
form().required(
|
||||||
this,
|
this,
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].manualDiscountPct`
|
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
||||||
)
|
)
|
||||||
]"
|
]"
|
||||||
@input="
|
@input="
|
||||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
||||||
${activeItemIndex}
|
${activeItemIndex}
|
||||||
].manualDiscountPct`)
|
].price`)
|
||||||
"
|
"
|
||||||
></gz-percent>
|
></gz-currency>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<!-- <v-col
|
<!-- <v-col
|
||||||
@@ -420,47 +419,7 @@
|
|||||||
></gz-currency>
|
></gz-currency>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
-->
|
||||||
v-if="form().showMe(this, 'WorkOrderItemLaborPrice')"
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
lg="4"
|
|
||||||
xl="3"
|
|
||||||
>
|
|
||||||
<gz-currency
|
|
||||||
v-model="
|
|
||||||
value.items[activeWoItemIndex].labors[activeItemIndex].price
|
|
||||||
"
|
|
||||||
:readonly="formState.readOnly || isDeleted"
|
|
||||||
:disabled="isDeleted"
|
|
||||||
:label="$ay.t('WorkOrderItemLaborPrice')"
|
|
||||||
:ref="
|
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
|
||||||
"
|
|
||||||
data-cy="laborprice"
|
|
||||||
:error-messages="
|
|
||||||
form().serverErrors(
|
|
||||||
this,
|
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
|
||||||
)
|
|
||||||
"
|
|
||||||
:rules="[
|
|
||||||
form().decimalValid(
|
|
||||||
this,
|
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
|
||||||
),
|
|
||||||
form().required(
|
|
||||||
this,
|
|
||||||
`Items[${activeWoItemIndex}].labors[${activeItemIndex}].price`
|
|
||||||
)
|
|
||||||
]"
|
|
||||||
@input="
|
|
||||||
fieldValueChanged(`Items[${activeWoItemIndex}].labors[
|
|
||||||
${activeItemIndex}
|
|
||||||
].price`)
|
|
||||||
"
|
|
||||||
></gz-currency>
|
|
||||||
</v-col> -->
|
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'WorkOrderItemLaborServiceDetails')"
|
v-if="form().showMe(this, 'WorkOrderItemLaborServiceDetails')"
|
||||||
@@ -505,66 +464,28 @@
|
|||||||
/* XXXeslint-disable */
|
/* XXXeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/*
|
/*
|
||||||
public long? UserId { get; set; }
|
|
||||||
[NotMapped]
|
|
||||||
public string UserViz { get; set; }
|
|
||||||
public DateTime? ServiceStartDate { get; set; }
|
|
||||||
public DateTime? ServiceStopDate { get; set; }
|
|
||||||
public long? ServiceRateId { get; set; }
|
|
||||||
[NotMapped]
|
|
||||||
public string ServiceRateViz { get; set; }
|
|
||||||
public string ServiceDetails { get; set; }
|
|
||||||
public decimal ServiceRateQuantity { get; set; }
|
|
||||||
public decimal NoChargeQuantity { get; set; }
|
|
||||||
public long? ServiceBankId { get; set; }
|
|
||||||
public long? TaxCodeSaleId { get; set; }
|
|
||||||
[NotMapped]
|
|
||||||
public string TaxCodeSaleViz { get; set; }
|
|
||||||
public decimal BasePrice { get; set; }//Rate price per unit at time of entry
|
|
||||||
public decimal Price { get; set; }//contract adjusted price or a copy of BasePrice if no contract
|
|
||||||
public decimal ManualDiscountPct { get; set; }// (V7 "Discount") ad-hoc / % off of the contractprice (which is always set regardless if contract or not) entered manually
|
|
||||||
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceStartDate", FieldKey = "WorkOrderItemLaborServiceStartDate", TKeySection = "WorkOrderItemLabors" });
|
"cost": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceStopDate", FieldKey = "WorkOrderItemLaborServiceStopDate", TKeySection = "WorkOrderItemLabors" });
|
"listPrice": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceRateQuantity", FieldKey = "WorkOrderItemLaborServiceRateQuantity", TKeySection = "WorkOrderItemLabors" });
|
"price": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceRateID", FieldKey = "WorkOrderItemLaborServiceRateID", TKeySection = "WorkOrderItemLabors" });
|
"taxName": null,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceDetails", FieldKey = "WorkOrderItemLaborServiceDetails", TKeySection = "WorkOrderItemLabors" });
|
"taxAPct": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborUserID", FieldKey = "WorkOrderItemLaborUserID", TKeySection = "WorkOrderItemLabors" });
|
"taxBPct": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborNoChargeQuantity", FieldKey = "WorkOrderItemLaborNoChargeQuantity", TKeySection = "WorkOrderItemLabors" });
|
"taxOnTax": false,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborTaxRateSaleID", FieldKey = "WorkOrderItemLaborTaxRateSaleID", TKeySection = "WorkOrderItemLabors" });
|
"taxAViz": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborManualDiscountPct", FieldKey = "WorkOrderItemLaborManualDiscountPct", TKeySection = "WorkOrderItemLabors" });
|
"taxBViz": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborBasePrice", FieldKey = "WorkOrderItemLaborBasePrice", TKeySection = "WorkOrderItemLabors" });
|
"lineTotalViz": 0,
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemLaborPrice", FieldKey = "WorkOrderItemLaborPrice", TKeySection = "WorkOrderItemLabors" });
|
l.Add(new FormField { TKey = "Cost", FieldKey = "LaborCost", TKeySection = "WorkOrderItemLabors" });
|
||||||
|
l.Add(new FormField { TKey = "ListPrice", FieldKey = "LaborListPrice", TKeySection = "WorkOrderItemLabors" });
|
||||||
|
l.Add(new FormField { TKey = "Price", FieldKey = "LaborPrice", TKeySection = "WorkOrderItemLabors" });
|
||||||
|
l.Add(new FormField { TKey = "Tax", FieldKey = "LaborTaxName", TKeySection = "WorkOrderItemLabors" });
|
||||||
|
l.Add(new FormField { TKey = "TaxCodeTaxA", FieldKey = "LaborTaxAPct", TKeySection = "WorkOrderItemLabors" });
|
||||||
"WorkOrderItemLaborBanked": "Banked",
|
l.Add(new FormField { TKey = "TaxCodeTaxB", FieldKey = "LaborTaxBPct", TKeySection = "WorkOrderItemLabors" });
|
||||||
"WorkOrderItemLaborRateCharge": "Rate Charge",
|
l.Add(new FormField { TKey = "TaxCodeTaxOnTax", FieldKey = "LaborTaxOnTax", TKeySection = "WorkOrderItemLabors" });
|
||||||
"WorkOrderItemLaborList": "Labors",
|
l.Add(new FormField { TKey = "TaxAAmt", FieldKey = "LaborTaxAViz", TKeySection = "WorkOrderItemLabors" });
|
||||||
"WorkOrderItemLaborNoChargeQuantity": "No Charge Quantity",
|
l.Add(new FormField { TKey = "TaxBAmt", FieldKey = "LaborTaxBViz", TKeySection = "WorkOrderItemLabors" });
|
||||||
"WorkOrderItemLaborServiceDetails": "Service Details",
|
l.Add(new FormField { TKey = "LineTotal", FieldKey = "LaborLineTotalViz", TKeySection = "WorkOrderItemLabors" });
|
||||||
"WorkOrderItemLaborServiceRateID": "Service Rate",
|
|
||||||
"WorkOrderItemLaborServiceRateQuantity": "Service Rate Quantity",
|
|
||||||
"WorkOrderItemLaborServiceStartDate": "Service Start Date Time",
|
|
||||||
"WorkOrderItemLaborServiceStopDate": "Service Stop Date Time",
|
|
||||||
"WorkOrderItemLaborTaxCodeID": "Tax Code",
|
|
||||||
"WorkOrderItemLaborTaxRateSaleID": "Sales tax",
|
|
||||||
"WorkOrderItemLaborUIBankWarning": "Are you sure you want to Bank this record?\r\n(Once this record is banked it will be locked and can no longer be edited)",
|
|
||||||
"WorkOrderItemLaborUIReBankWarning": "This item is already banked",
|
|
||||||
"WorkOrderItemLaborUserID": "User",
|
|
||||||
WorkOrderItemLaborManualDiscountPct
|
|
||||||
WorkOrderItemLaborBasePrice
|
|
||||||
WorkOrderItemLaborPrice
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"CREATE TABLE aworkorderitemlabor (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
|
||||||
+ "userid BIGINT REFERENCES auser, servicestartdate TIMESTAMP, servicestopdate TIMESTAMP, servicerateid BIGINT REFERENCES aservicerate, servicedetails text, "
|
|
||||||
+ "serviceratequantity DECIMAL(19,5) NOT NULL default 0, nochargequantity DECIMAL(19,5) NOT NULL default 0, servicebankid BIGINT REFERENCES aservicebank, "
|
|
||||||
+ "taxcodesaleid BIGINT REFERENCES ataxcode, baseprice DECIMAL(38,18) NOT NULL default 0, price DECIMAL(38,18) NOT NULL default 0, "
|
|
||||||
+ "manualdiscountpct DECIMAL(8,5) NOT NULL default 0 "
|
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
@@ -762,14 +683,13 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//executive decision not to show long form fields in grids
|
if (this.form().showMe(this, "WorkOrderItemLaborServiceDetails")) {
|
||||||
// if (this.form().showMe(this, "WorkOrderItemLaborServiceDetails")) {
|
headers.push({
|
||||||
// headers.push({
|
text: this.$ay.t("WorkOrderItemLaborServiceDetails"),
|
||||||
// text: this.$ay.t("WorkOrderItemLaborServiceDetails"),
|
align: "left",
|
||||||
// align: "left",
|
value: "serviceDetails"
|
||||||
// value: "serviceDetails"
|
});
|
||||||
// });
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemLaborUserID")) {
|
if (this.form().showMe(this, "WorkOrderItemLaborUserID")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
@@ -787,38 +707,85 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemLaborTaxRateSaleID")) {
|
if (this.form().showMe(this, "LaborCost")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemLaborTaxRateSaleID"),
|
text: this.$ay.t("Cost"),
|
||||||
align: "left",
|
|
||||||
value: "taxCodeSaleViz"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemLaborManualDiscountPct")) {
|
|
||||||
headers.push({
|
|
||||||
text: this.$ay.t("WorkOrderItemLaborManualDiscountPct"),
|
|
||||||
align: "right",
|
align: "right",
|
||||||
value: "manualDiscountPct"
|
value: "cost"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemLaborBasePrice")) {
|
if (this.form().showMe(this, "LaborListPrice")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemLaborBasePrice"),
|
text: this.$ay.t("ListPrice"),
|
||||||
align: "right",
|
align: "right",
|
||||||
value: "basePrice"
|
value: "listPrice"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemLaborPrice")) {
|
if (this.form().showMe(this, "LaborPrice")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemLaborPrice"),
|
text: this.$ay.t("Price"),
|
||||||
align: "right",
|
align: "right",
|
||||||
value: "price"
|
value: "price"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborTaxName")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("Tax"),
|
||||||
|
align: "left",
|
||||||
|
value: "taxName"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborTaxAPct")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxCodeTaxA"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxAPct"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborTaxBPct")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxCodeTaxB"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxBPct"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborTaxAViz")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxAAmt"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxAViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborTaxBViz")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxBAmt"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxBViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborTaxOnTax")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxCodeTaxOnTax"),
|
||||||
|
align: "center",
|
||||||
|
value: "taxOnTax"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "LaborLineTotalViz")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("LineTotal"),
|
||||||
|
align: "right",
|
||||||
|
value: "lineTotalViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
return headers;
|
return headers;
|
||||||
},
|
},
|
||||||
itemList: function() {
|
itemList: function() {
|
||||||
@@ -849,36 +816,13 @@ export default {
|
|||||||
x.noChargeQuantity,
|
x.noChargeQuantity,
|
||||||
this.pvm.languageName
|
this.pvm.languageName
|
||||||
),
|
),
|
||||||
taxCodeSaleViz: x.taxCodeSaleViz,
|
cost: window.$gz.locale.currencyLocalized(
|
||||||
|
x.cost,
|
||||||
/*
|
this.pvm.languageName,
|
||||||
"cost": 0,
|
this.pvm.currencyName
|
||||||
"listPrice": 0,
|
),
|
||||||
"price": 0,
|
listPrice: window.$gz.locale.currencyLocalized(
|
||||||
"taxName": null,
|
x.listPrice,
|
||||||
"taxAPct": 0,
|
|
||||||
"taxBPct": 0,
|
|
||||||
"taxOnTax": false,
|
|
||||||
"taxAViz": 0,
|
|
||||||
"taxBViz": 0,
|
|
||||||
"lineTotalViz": 0,
|
|
||||||
l.Add(new FormField { TKey = "Tax", FieldKey = "LaborTaxName", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
l.Add(new FormField { TKey = "TaxCodeTaxA", FieldKey = "LaborTaxAPct", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
l.Add(new FormField { TKey = "TaxCodeTaxB", FieldKey = "LaborTaxBPct", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
l.Add(new FormField { TKey = "TaxCodeTaxOnTax", FieldKey = "LaborTaxOnTax", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
l.Add(new FormField { TKey = "TaxAAmt", FieldKey = "LaborTaxAViz", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
l.Add(new FormField { TKey = "TaxBAmt", FieldKey = "LaborTaxBViz", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
l.Add(new FormField { TKey = "LineTotal", FieldKey = "LaborLineTotalViz", TKeySection = "WorkOrderItemLabors" });
|
|
||||||
*/
|
|
||||||
|
|
||||||
manualDiscountPct:
|
|
||||||
window.$gz.locale.decimalLocalized(
|
|
||||||
x.manualDiscountPct,
|
|
||||||
this.pvm.languageName
|
|
||||||
) + "%",
|
|
||||||
|
|
||||||
basePrice: window.$gz.locale.currencyLocalized(
|
|
||||||
x.basePrice,
|
|
||||||
this.pvm.languageName,
|
this.pvm.languageName,
|
||||||
this.pvm.currencyName
|
this.pvm.currencyName
|
||||||
),
|
),
|
||||||
@@ -886,6 +830,33 @@ export default {
|
|||||||
x.price,
|
x.price,
|
||||||
this.pvm.languageName,
|
this.pvm.languageName,
|
||||||
this.pvm.currencyName
|
this.pvm.currencyName
|
||||||
|
),
|
||||||
|
taxName: x.taxName,
|
||||||
|
taxAPct:
|
||||||
|
window.$gz.locale.decimalLocalized(
|
||||||
|
x.taxAPct,
|
||||||
|
this.pvm.languageName
|
||||||
|
) + "%",
|
||||||
|
taxBPct:
|
||||||
|
window.$gz.locale.decimalLocalized(
|
||||||
|
x.taxBPct,
|
||||||
|
this.pvm.languageName
|
||||||
|
) + "%",
|
||||||
|
taxOnTax: x.taxOnTax,
|
||||||
|
taxAViz: window.$gz.locale.currencyLocalized(
|
||||||
|
x.taxAViz,
|
||||||
|
this.pvm.languageName,
|
||||||
|
this.pvm.currencyName
|
||||||
|
),
|
||||||
|
taxBViz: window.$gz.locale.currencyLocalized(
|
||||||
|
x.taxBViz,
|
||||||
|
this.pvm.languageName,
|
||||||
|
this.pvm.currencyName
|
||||||
|
),
|
||||||
|
lineTotalViz: window.$gz.locale.currencyLocalized(
|
||||||
|
x.lineTotalViz,
|
||||||
|
this.pvm.languageName,
|
||||||
|
this.pvm.currencyName
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user