This commit is contained in:
2021-05-11 00:01:26 +00:00
parent 3ff5ce1d0f
commit d81b61d1d4
2 changed files with 109 additions and 78 deletions

View File

@@ -307,7 +307,6 @@ todo: many biz objects are not using new PUT methodology
CURRENTLY DOING:
todo: hunt down and elminiate any "misc" in Expenses translations
TODO: test new from scratch wo regularly
@@ -333,7 +332,7 @@ OVERALL
#####################################################################
=================== WORKORDER TODO / ON HOLD ========================
todo: workorderitemlabor new record stop date sb +1 hour
todo: make sure all rules are mirrored at both ends (like date precedence etc)
todo: signature: report helper display signature and form ui control to capture /display signature
TODO: Test address / units select alternate when have units working

View File

@@ -5,9 +5,7 @@
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<div class="text-h6">
<v-icon large color="primary" class="mr-2"
>$ayiMoneyBillWave</v-icon
>
<v-icon large color="primary" class="mr-2">$ayiHammer</v-icon>
{{ $ay.t("WorkOrderItemLaborList") }}
<v-btn v-if="!parentDeleted" large icon v-bind="attrs" v-on="on">
<v-icon small color="primary">$ayiEllipsisV</v-icon>
@@ -70,6 +68,8 @@
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
>
-------------------------------------------------------------
<v-col
v-if="form().showMe(this, 'WorkOrderItemLaborName')"
cols="12"
@@ -412,18 +412,24 @@
/* XXXeslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*
public long? UserId { get; set; }
public DateTime? ServiceStartDate { get; set; }
public DateTime? ServiceStopDate { get; set; }
public long? ServiceRateId { 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; }
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
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" });
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceStopDate", FieldKey = "WorkOrderItemLaborServiceStopDate", TKeySection = "WorkOrderItemLabors" });
@@ -436,7 +442,6 @@ l.Add(new FormField { TKey = "WorkOrderItemLaborTaxRateSaleID", FieldKey = "Work
l.Add(new FormField { TKey = "WorkOrderItemLaborManualDiscountPct", FieldKey = "WorkOrderItemLaborManualDiscountPct", TKeySection = "WorkOrderItemLabors" });
l.Add(new FormField { TKey = "WorkOrderItemLaborBasePrice", FieldKey = "WorkOrderItemLaborBasePrice", TKeySection = "WorkOrderItemLabors" });
l.Add(new FormField { TKey = "WorkOrderItemLaborPrice", FieldKey = "WorkOrderItemLaborPrice", TKeySection = "WorkOrderItemLabors" });
l.Add(new FormField { TKey = "WorkOrderItemLaborServiceStartDate", FieldKey = "WorkOrderItemLaborServiceStartDate", TKeySection = "WorkOrderItemLabors" });
@@ -516,17 +521,18 @@ export default {
this.value.items[this.activeWoItemIndex].labors.push({
id: 0,
concurrency: 0,
description: null,
name: null,
totalCost: 0,
chargeAmount: 0,
taxPaid: 0,
chargeTaxCodeId: 0,
chargeTaxCodeViz: null,
reimburseUser: false,
userId: null,
userViz: null,
chargeToCustomer: false,
serviceStartDate: window.$gz.locale.nowUTC8601String(),
serviceStopDate: window.$gz.locale.nowUTC8601String(), //TODO:sb now plus one hour to match v7
serviceRateId: null,
serviceDetails: null,
serviceRateQuantity: 1,
noChargeQuantity: 0,
serviceBankId: null,
taxCodeSaleId: null,
basePrice: 0,
price: 0,
manualDiscountPct: 0,
isDirty: true,
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
uid: Date.now() //used for error tracking / display
@@ -624,61 +630,46 @@ export default {
*/
let headers = [];
if (this.form().showMe(this, "WorkOrderItemLaborName")) {
if (this.form().showMe(this, "WorkOrderItemLaborServiceStartDate")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborName"),
text: this.$ay.t("WorkOrderItemLaborServiceStartDate"),
align: "right",
value: "serviceStartDate"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborServiceStopDate")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborServiceStopDate"),
align: "right",
value: "serviceStopDate"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborServiceRateQuantity")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborServiceRateQuantity"),
align: "right",
value: "serviceRateQuantity"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborServiceRateID")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborServiceRateID"),
align: "left",
value: "name"
value: "serviceRateViz"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborTotalCost")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborTotalCost"),
align: "right",
value: "totalCost"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborChargeAmount")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborChargeAmount"),
align: "right",
value: "chargeAmount"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborChargeToCustomer")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborChargeToCustomer"),
align: "center",
value: "chargeToCustomer"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborTaxPaid")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborTaxPaid"),
align: "right",
value: "taxPaid"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborChargeTaxCodeID")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborChargeTaxCodeID"),
align: "left",
value: "chargeTaxCodeViz"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborReimburseUser")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborReimburseUser"),
align: "center",
value: "reimburseUser"
});
}
//executive decision not to show long form fields in grids
// if (this.form().showMe(this, "WorkOrderItemLaborServiceDetails")) {
// headers.push({
// text: this.$ay.t("WorkOrderItemLaborServiceDetails"),
// align: "left",
// value: "serviceDetails"
// });
// }
if (this.form().showMe(this, "WorkOrderItemLaborUserID")) {
headers.push({
@@ -688,9 +679,50 @@ export default {
});
}
if (this.form().showMe(this, "WorkOrderItemLaborNoChargeQuantity")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborNoChargeQuantity"),
align: "right",
value: "noChargeQuantity"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborTaxRateSaleID")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborTaxRateSaleID"),
align: "left",
value: "TaxCodeSaleViz"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborManualDiscountPct")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborManualDiscountPct"),
align: "right",
value: "manualDiscountPct"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborBasePrice")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborBasePrice"),
align: "right",
value: "basePrice"
});
}
if (this.form().showMe(this, "WorkOrderItemLaborPrice")) {
headers.push({
text: this.$ay.t("WorkOrderItemLaborPrice"),
align: "right",
value: "price"
});
}
return headers;
},
itemList: function() {
HERE NEXT, then actual form fields
return this.value.items[this.activeWoItemIndex].labors.map((x, i) => {
return {
index: i,