Added Compatibility Check for Old Documents
Added Width to Product and Service Select
This commit is contained in:
@@ -103,9 +103,7 @@ const setupPage = async () => {
|
|||||||
if(route.params) {
|
if(route.params) {
|
||||||
if(route.params.id) {
|
if(route.params.id) {
|
||||||
itemInfo.value = await useSupabaseSelectSingle("createddocuments", route.params.id)
|
itemInfo.value = await useSupabaseSelectSingle("createddocuments", route.params.id)
|
||||||
|
checkCompatibilityWithInputPrice()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(itemInfo.value.project) checkForOpenAdvanceInvoices()
|
if(itemInfo.value.project) checkForOpenAdvanceInvoices()
|
||||||
@@ -257,9 +255,10 @@ const setupPage = async () => {
|
|||||||
itemInfo.value.endText = linkedDocument.endText
|
itemInfo.value.endText = linkedDocument.endText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setCustomerData(null,true)
|
setCustomerData(null,true)
|
||||||
|
|
||||||
|
checkCompatibilityWithInputPrice()
|
||||||
|
|
||||||
if(route.query.loadMode === "storno") {
|
if(route.query.loadMode === "storno") {
|
||||||
itemInfo.value.rows.forEach(row => {
|
itemInfo.value.rows.forEach(row => {
|
||||||
row.price = row.price * -1
|
row.price = row.price * -1
|
||||||
@@ -1192,6 +1191,15 @@ const getTextTemplateByType = (type, pos) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkCompatibilityWithInputPrice = () => {
|
||||||
|
itemInfo.value.rows.forEach(row => {
|
||||||
|
console.log(row)
|
||||||
|
if(!row.inputPrice) {
|
||||||
|
row.inputPrice = row.price
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const updateCustomSurcharge = () => {
|
const updateCustomSurcharge = () => {
|
||||||
itemInfo.value.rows.forEach(row => {
|
itemInfo.value.rows.forEach(row => {
|
||||||
if(!["pagebreak","title","text"].includes(row.mode)) {
|
if(!["pagebreak","title","text"].includes(row.mode)) {
|
||||||
@@ -2000,7 +2008,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
>
|
>
|
||||||
<InputGroup class="w-full">
|
<InputGroup class="w-full">
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
class="flex-auto"
|
class="w-60"
|
||||||
:options="products"
|
:options="products"
|
||||||
:color="row.product ? 'primary' : 'rose'"
|
:color="row.product ? 'primary' : 'rose'"
|
||||||
option-attribute="name"
|
option-attribute="name"
|
||||||
@@ -2069,7 +2077,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
>
|
>
|
||||||
<InputGroup class="w-full">
|
<InputGroup class="w-full">
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
class="flex-auto"
|
class="w-60"
|
||||||
:options="services"
|
:options="services"
|
||||||
:color="row.service ? 'primary' : 'rose'"
|
:color="row.service ? 'primary' : 'rose'"
|
||||||
option-attribute="name"
|
option-attribute="name"
|
||||||
|
|||||||
Reference in New Issue
Block a user