This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
<v-btn icon class="ml-n1 mr-2" @click="picking = true">
|
<v-btn icon class="ml-n1 mr-2" @click="picking = true">
|
||||||
<v-icon>$ayiEdit</v-icon>
|
<v-icon>$ayiEdit</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<span @click="picking = true">{{ display }}</span>
|
<span>{{ display }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,9 +91,11 @@ export default {
|
|||||||
if (this.picking) {
|
if (this.picking) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (this.value == null || this.display == null || this.display == "") {
|
|
||||||
|
if (this.display == null || this.display == "" || this.display == "-") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,13 +285,15 @@
|
|||||||
lg="4"
|
lg="4"
|
||||||
xl="3"
|
xl="3"
|
||||||
>
|
>
|
||||||
<gz-pick-list
|
<gz-tax-picker
|
||||||
:aya-type="$ay.ayt().TaxCode"
|
|
||||||
:show-edit-icon="true"
|
:show-edit-icon="true"
|
||||||
v-model="
|
v-model="
|
||||||
value.items[activeWoItemIndex].expenses[activeItemIndex]
|
value.items[activeWoItemIndex].expenses[activeItemIndex]
|
||||||
.chargeTaxCodeId
|
.chargeTaxCodeId
|
||||||
"
|
"
|
||||||
|
:display="
|
||||||
|
value.items[activeWoItemIndex].expenses[activeItemIndex].taxName
|
||||||
|
"
|
||||||
:readonly="formState.readOnly || isDeleted"
|
:readonly="formState.readOnly || isDeleted"
|
||||||
:disabled="isDeleted"
|
:disabled="isDeleted"
|
||||||
:label="$ay.t('WorkOrderItemExpenseChargeTaxCodeID')"
|
:label="$ay.t('WorkOrderItemExpenseChargeTaxCodeID')"
|
||||||
@@ -311,7 +313,7 @@
|
|||||||
)
|
)
|
||||||
"
|
"
|
||||||
@update:name="taxCodeChange"
|
@update:name="taxCodeChange"
|
||||||
></gz-pick-list>
|
></gz-tax-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
@@ -425,55 +427,11 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/* XXXeslint-disable */
|
/* XXXeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/*
|
import GzTaxPicker from "./tax-picker.vue";
|
||||||
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseChargeAmount", FieldKey = "WorkOrderItemExpenseChargeAmount", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseChargeTaxCodeID", FieldKey = "WorkOrderItemExpenseChargeTaxCodeID", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseTaxPaid", FieldKey = "WorkOrderItemExpenseTaxPaid", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseChargeToCustomer", FieldKey = "WorkOrderItemExpenseChargeToCustomer", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseDescription", FieldKey = "WorkOrderItemExpenseDescription", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseName", FieldKey = "WorkOrderItemExpenseName", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseReimburseUser", FieldKey = "WorkOrderItemExpenseReimburseUser", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseTotalCost", FieldKey = "WorkOrderItemExpenseTotalCost", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
l.Add(new FormField { TKey = "WorkOrderItemExpenseUserID", FieldKey = "WorkOrderItemExpenseUserID", TKeySection = "WorkOrderItemExpense" });
|
|
||||||
|
|
||||||
|
|
||||||
public string Description { get; set; }
|
|
||||||
public string Name { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal TotalCost { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal ChargeAmount { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal TaxPaid { get; set; }
|
|
||||||
public long? ChargeTaxCodeId { get; set; }
|
|
||||||
[NotMapped]
|
|
||||||
public string ChargeTaxCodeViz { get; set; }
|
|
||||||
public bool ReimburseUser { get; set; } = false;
|
|
||||||
public long? UserId { get; set; }
|
|
||||||
[NotMapped]
|
|
||||||
public string UserViz { get; set; }
|
|
||||||
public bool ChargeToCustomer { get; set; } = false;
|
|
||||||
|
|
||||||
|
|
||||||
await ExecQueryAsync("CREATE TABLE aworkorderitemexpense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
|
|
||||||
+ "description TEXT, name TEXT, totalcost DECIMAL(38,18) NOT NULL default 0, chargeamount DECIMAL(38,18) NOT NULL default 0, taxpaid DECIMAL(38,18) NOT NULL default 0, "
|
|
||||||
+ "chargetaxcodeid BIGINT REFERENCES ataxcode, reimburseuser BOOL NOT NULL, userid BIGINT REFERENCES auser, chargetocustomer BOOL NOT NULL"
|
|
||||||
+ ")");
|
|
||||||
|
|
||||||
|
|
||||||
"WorkOrderItemExpenseChargeAmount": "Charge Amount",
|
|
||||||
"WorkOrderItemExpenseChargeTaxCodeID": "Charge Tax Code",
|
|
||||||
"WorkOrderItemExpenseChargeToCustomer": "Charge to customer?",
|
|
||||||
"WorkOrderItemExpenseDescription": "Description",
|
|
||||||
"WorkOrderItemExpenseList": "Expenses",
|
|
||||||
"WorkOrderItemExpenseName": "Misc Exp Summary",
|
|
||||||
"WorkOrderItemExpenseReimburseUser": "Reimburse User?",
|
|
||||||
"WorkOrderItemExpenseTaxPaid": "Tax Paid",
|
|
||||||
"WorkOrderItemExpenseTotalCost": "Total Cost",
|
|
||||||
"WorkOrderItemExpenseUserID": "User",
|
|
||||||
*/
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
GzTaxPicker
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.setDefaultView();
|
this.setDefaultView();
|
||||||
},
|
},
|
||||||
@@ -513,7 +471,7 @@ export default {
|
|||||||
taxCodeChange(newName) {
|
taxCodeChange(newName) {
|
||||||
this.value.items[this.activeWoItemIndex].expenses[
|
this.value.items[this.activeWoItemIndex].expenses[
|
||||||
this.activeItemIndex
|
this.activeItemIndex
|
||||||
].chargeTaxCodeViz = newName;
|
].taxName = newName;
|
||||||
},
|
},
|
||||||
newItem() {
|
newItem() {
|
||||||
let newIndex = this.value.items[this.activeWoItemIndex].expenses.length;
|
let newIndex = this.value.items[this.activeWoItemIndex].expenses.length;
|
||||||
@@ -672,9 +630,57 @@ export default {
|
|||||||
|
|
||||||
if (this.form().showMe(this, "WorkOrderItemExpenseChargeTaxCodeID")) {
|
if (this.form().showMe(this, "WorkOrderItemExpenseChargeTaxCodeID")) {
|
||||||
headers.push({
|
headers.push({
|
||||||
text: this.$ay.t("WorkOrderItemExpenseChargeTaxCodeID"),
|
text: this.$ay.t("Tax"),
|
||||||
align: "left",
|
align: "left",
|
||||||
value: "chargeTaxCodeViz"
|
value: "taxName"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "ExpenseTaxAPct")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxCodeTaxA"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxAPct"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "ExpenseTaxBPct")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxCodeTaxB"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxBPct"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "ExpenseTaxAViz")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxAAmt"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxAViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "ExpenseTaxBViz")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxBAmt"),
|
||||||
|
align: "right",
|
||||||
|
value: "taxBViz"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "ExpenseTaxOnTax")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("TaxCodeTaxOnTax"),
|
||||||
|
align: "center",
|
||||||
|
value: "taxOnTax"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.form().showMe(this, "ExpenseLineTotalViz")) {
|
||||||
|
headers.push({
|
||||||
|
text: this.$ay.t("LineTotal"),
|
||||||
|
align: "right",
|
||||||
|
value: "lineTotalViz"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -718,7 +724,33 @@ export default {
|
|||||||
this.pvm.languageName,
|
this.pvm.languageName,
|
||||||
this.pvm.currencyName
|
this.pvm.currencyName
|
||||||
),
|
),
|
||||||
chargeTaxCodeViz: x.chargeTaxCodeViz,
|
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
|
||||||
|
),
|
||||||
reimburseUser: x.reimburseUser,
|
reimburseUser: x.reimburseUser,
|
||||||
userViz: x.userViz
|
userViz: x.userViz
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -465,30 +465,7 @@
|
|||||||
/* XXXeslint-disable */
|
/* XXXeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
import GzTaxPicker from "./tax-picker.vue";
|
import GzTaxPicker from "./tax-picker.vue";
|
||||||
/*
|
|
||||||
|
|
||||||
"cost": 0,
|
|
||||||
"listPrice": 0,
|
|
||||||
"price": 0,
|
|
||||||
"taxName": null,
|
|
||||||
"taxAPct": 0,
|
|
||||||
"taxBPct": 0,
|
|
||||||
"taxOnTax": false,
|
|
||||||
"taxAViz": 0,
|
|
||||||
"taxBViz": 0,
|
|
||||||
"lineTotalViz": 0,
|
|
||||||
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" });
|
|
||||||
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" });
|
|
||||||
|
|
||||||
*/
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GzTaxPicker
|
GzTaxPicker
|
||||||
|
|||||||
Reference in New Issue
Block a user