Added Zahlungsart
This commit is contained in:
@@ -36,6 +36,7 @@ const itemInfo = ref({
|
|||||||
deliveryDateType: "Lieferdatum",
|
deliveryDateType: "Lieferdatum",
|
||||||
dateOfPerformance: null,
|
dateOfPerformance: null,
|
||||||
paymentDays: auth.activeTenantData.standardPaymentDays,
|
paymentDays: auth.activeTenantData.standardPaymentDays,
|
||||||
|
payment_type: "transfer",
|
||||||
customSurchargePercentage: 0,
|
customSurchargePercentage: 0,
|
||||||
createdBy: auth.user.id,
|
createdBy: auth.user.id,
|
||||||
title: null,
|
title: null,
|
||||||
@@ -295,6 +296,7 @@ const setupPage = async () => {
|
|||||||
if (optionsToImport.deliveryDateEnd) itemInfo.value.deliveryDateEnd = linkedDocument.deliveryDateEnd
|
if (optionsToImport.deliveryDateEnd) itemInfo.value.deliveryDateEnd = linkedDocument.deliveryDateEnd
|
||||||
if (optionsToImport.documentDate) itemInfo.value.documentDate = linkedDocument.documentDate
|
if (optionsToImport.documentDate) itemInfo.value.documentDate = linkedDocument.documentDate
|
||||||
if (optionsToImport.paymentDays) itemInfo.value.paymentDays = linkedDocument.paymentDays
|
if (optionsToImport.paymentDays) itemInfo.value.paymentDays = linkedDocument.paymentDays
|
||||||
|
if (optionsToImport.payment_type) itemInfo.value.payment_type = linkedDocument.payment_type
|
||||||
if (optionsToImport.customSurchargePercentage) itemInfo.value.customSurchargePercentage = linkedDocument.customSurchargePercentage
|
if (optionsToImport.customSurchargePercentage) itemInfo.value.customSurchargePercentage = linkedDocument.customSurchargePercentage
|
||||||
if (optionsToImport.contactPerson) itemInfo.value.contactPerson = linkedDocument.contactPerson
|
if (optionsToImport.contactPerson) itemInfo.value.contactPerson = linkedDocument.contactPerson
|
||||||
if (optionsToImport.plant) itemInfo.value.plant = linkedDocument.plant
|
if (optionsToImport.plant) itemInfo.value.plant = linkedDocument.plant
|
||||||
@@ -320,6 +322,7 @@ const setupPage = async () => {
|
|||||||
itemInfo.value.deliveryDateEnd = linkedDocument.deliveryDateEnd
|
itemInfo.value.deliveryDateEnd = linkedDocument.deliveryDateEnd
|
||||||
itemInfo.value.documentDate = linkedDocument.documentDate
|
itemInfo.value.documentDate = linkedDocument.documentDate
|
||||||
itemInfo.value.paymentDays = linkedDocument.paymentDays
|
itemInfo.value.paymentDays = linkedDocument.paymentDays
|
||||||
|
itemInfo.value.payment_type = linkedDocument.payment_type
|
||||||
itemInfo.value.customSurchargePercentage = linkedDocument.customSurchargePercentage
|
itemInfo.value.customSurchargePercentage = linkedDocument.customSurchargePercentage
|
||||||
itemInfo.value.contactPerson = linkedDocument.contactPerson
|
itemInfo.value.contactPerson = linkedDocument.contactPerson
|
||||||
itemInfo.value.plant = linkedDocument.plant
|
itemInfo.value.plant = linkedDocument.plant
|
||||||
@@ -460,6 +463,7 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => {
|
|||||||
itemInfo.value.address.special = customer.infoData.special
|
itemInfo.value.address.special = customer.infoData.special
|
||||||
|
|
||||||
if (!loadOnlyAdress && customer.customPaymentDays) itemInfo.value.paymentDays = customer.customPaymentDays
|
if (!loadOnlyAdress && customer.customPaymentDays) itemInfo.value.paymentDays = customer.customPaymentDays
|
||||||
|
if (!loadOnlyAdress && customer.custom_payment_type) itemInfo.value.payment_type = customer.custom_payment_type
|
||||||
|
|
||||||
if (!loadOnlyAdress && customer.customSurchargePercentage) {
|
if (!loadOnlyAdress && customer.customSurchargePercentage) {
|
||||||
itemInfo.value.customSurchargePercentage = customer.customSurchargePercentage
|
itemInfo.value.customSurchargePercentage = customer.customSurchargePercentage
|
||||||
@@ -1054,6 +1058,7 @@ const getDocumentData = async () => {
|
|||||||
nachname: (contactData && contactData.lastName) || (customerData && customerData.lastname),
|
nachname: (contactData && contactData.lastName) || (customerData && customerData.lastname),
|
||||||
kundenname: customerData && customerData.name,
|
kundenname: customerData && customerData.name,
|
||||||
zahlungsziel_in_tagen: itemInfo.paymentDays,
|
zahlungsziel_in_tagen: itemInfo.paymentDays,
|
||||||
|
zahlungsart: itemInfo.payment_type === "transfer" ? "Überweisung" : "Lastschrift",
|
||||||
diesel_gesamtverbrauch: (itemInfo.agriculture && itemInfo.agriculture.dieselUsageTotal) && itemInfo.agriculture.dieselUsageTotal
|
diesel_gesamtverbrauch: (itemInfo.agriculture && itemInfo.agriculture.dieselUsageTotal) && itemInfo.agriculture.dieselUsageTotal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1257,6 +1262,7 @@ const saveSerialInvoice = async () => {
|
|||||||
address: itemInfo.value.address,
|
address: itemInfo.value.address,
|
||||||
project: itemInfo.value.project,
|
project: itemInfo.value.project,
|
||||||
paymentDays: itemInfo.value.paymentDays,
|
paymentDays: itemInfo.value.paymentDays,
|
||||||
|
payment_type: itemInfo.value.payment_type,
|
||||||
deliveryDateType: "Leistungszeitraum",
|
deliveryDateType: "Leistungszeitraum",
|
||||||
createdBy: itemInfo.value.createdBy,
|
createdBy: itemInfo.value.createdBy,
|
||||||
title: itemInfo.value.title,
|
title: itemInfo.value.title,
|
||||||
@@ -1344,6 +1350,7 @@ const saveDocument = async (state, resetup = false) => {
|
|||||||
deliveryDate: itemInfo.value.deliveryDate,
|
deliveryDate: itemInfo.value.deliveryDate,
|
||||||
deliveryDateEnd: itemInfo.value.deliveryDateEnd,
|
deliveryDateEnd: itemInfo.value.deliveryDateEnd,
|
||||||
paymentDays: itemInfo.value.paymentDays,
|
paymentDays: itemInfo.value.paymentDays,
|
||||||
|
payment_type: itemInfo.value.payment_type,
|
||||||
deliveryDateType: itemInfo.value.deliveryDateType,
|
deliveryDateType: itemInfo.value.deliveryDateType,
|
||||||
info: {},
|
info: {},
|
||||||
createdBy: itemInfo.value.createdBy,
|
createdBy: itemInfo.value.createdBy,
|
||||||
@@ -1950,6 +1957,29 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
v-model="itemInfo.paymentDays"
|
v-model="itemInfo.paymentDays"
|
||||||
/>
|
/>
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
class="w-full"
|
||||||
|
label="Zahlungsart:"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
v-model="itemInfo.payment_type"
|
||||||
|
value-attribute="key"
|
||||||
|
option-attribute="label"
|
||||||
|
:options="[
|
||||||
|
{
|
||||||
|
key: 'transfer',
|
||||||
|
label: 'Überweisung'
|
||||||
|
},{
|
||||||
|
key: 'direct-debit',
|
||||||
|
label: 'SEPA Lastschrift'
|
||||||
|
}
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<template #label>
|
||||||
|
{{itemInfo.payment_type === 'transfer' ? "Überweisung" : "SEPA-Lastschrift"}}
|
||||||
|
</template>
|
||||||
|
</USelectMenu>
|
||||||
|
</UFormGroup>
|
||||||
<UFormGroup
|
<UFormGroup
|
||||||
class="w-full"
|
class="w-full"
|
||||||
label="Individueller Aufschlag:"
|
label="Individueller Aufschlag:"
|
||||||
|
|||||||
@@ -347,6 +347,18 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
inputType: "number",
|
inputType: "number",
|
||||||
inputColumn: "Allgemeines",
|
inputColumn: "Allgemeines",
|
||||||
sortable: true
|
sortable: true
|
||||||
|
},{
|
||||||
|
key: "custom_payment_type",
|
||||||
|
label: "Zahlungsart",
|
||||||
|
inputType: "select",
|
||||||
|
selectValueAttribute:"key",
|
||||||
|
selectOptionAttribute: "label",
|
||||||
|
selectManualOptions: [
|
||||||
|
{label:'Überweisung', key: 'transfer'},
|
||||||
|
{label:'SEPA Lastschrift', key: 'direct-debit'},
|
||||||
|
],
|
||||||
|
inputColumn: "Allgemeines",
|
||||||
|
sortable: true
|
||||||
}, {
|
}, {
|
||||||
key: "customSurchargePercentage",
|
key: "customSurchargePercentage",
|
||||||
label: "Individueller Aufschlag",
|
label: "Individueller Aufschlag",
|
||||||
|
|||||||
Reference in New Issue
Block a user