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.id) {
|
||||
itemInfo.value = await useSupabaseSelectSingle("createddocuments", route.params.id)
|
||||
|
||||
|
||||
|
||||
checkCompatibilityWithInputPrice()
|
||||
}
|
||||
|
||||
if(itemInfo.value.project) checkForOpenAdvanceInvoices()
|
||||
@@ -257,9 +255,10 @@ const setupPage = async () => {
|
||||
itemInfo.value.endText = linkedDocument.endText
|
||||
}
|
||||
|
||||
|
||||
setCustomerData(null,true)
|
||||
|
||||
checkCompatibilityWithInputPrice()
|
||||
|
||||
if(route.query.loadMode === "storno") {
|
||||
itemInfo.value.rows.forEach(row => {
|
||||
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 = () => {
|
||||
itemInfo.value.rows.forEach(row => {
|
||||
if(!["pagebreak","title","text"].includes(row.mode)) {
|
||||
@@ -2000,7 +2008,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
||||
>
|
||||
<InputGroup class="w-full">
|
||||
<USelectMenu
|
||||
class="flex-auto"
|
||||
class="w-60"
|
||||
:options="products"
|
||||
:color="row.product ? 'primary' : 'rose'"
|
||||
option-attribute="name"
|
||||
@@ -2069,7 +2077,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
||||
>
|
||||
<InputGroup class="w-full">
|
||||
<USelectMenu
|
||||
class="flex-auto"
|
||||
class="w-60"
|
||||
:options="services"
|
||||
:color="row.service ? 'primary' : 'rose'"
|
||||
option-attribute="name"
|
||||
|
||||
Reference in New Issue
Block a user