diff --git a/backend/db/schema/customers.ts b/backend/db/schema/customers.ts index 67743e8..653d27f 100644 --- a/backend/db/schema/customers.ts +++ b/backend/db/schema/customers.ts @@ -62,6 +62,7 @@ export const customers = pgTable( updatedBy: uuid("updated_by").references(() => authUsers.id), customPaymentType: text("custom_payment_type"), // ENUM payment_types separat? + customTaxType: text("customTaxType"), } ) diff --git a/frontend/pages/createDocument/edit/[[id]].vue b/frontend/pages/createDocument/edit/[[id]].vue index 52dd9ae..768209a 100644 --- a/frontend/pages/createDocument/edit/[[id]].vue +++ b/frontend/pages/createDocument/edit/[[id]].vue @@ -475,6 +475,10 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => { 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) { + itemInfo.value.taxType = customer.customTaxType || "Standard" + setTaxType() + } if (!loadOnlyAdress && customer.customSurchargePercentage) { itemInfo.value.customSurchargePercentage = customer.customSurchargePercentage diff --git a/frontend/stores/data.js b/frontend/stores/data.js index b04fdb0..8172781 100644 --- a/frontend/stores/data.js +++ b/frontend/stores/data.js @@ -310,6 +310,19 @@ export const useDataStore = defineStore('data', () => { ], inputColumn: "Allgemeines", sortable: true + },{ + key: "customTaxType", + label: "Standard Steuertyp", + inputType: "select", + selectValueAttribute:"key", + selectOptionAttribute: "label", + selectManualOptions: [ + {label:'Standard', key: 'Standard'}, + {label:'13b UStG', key: '13b UStG'}, + {label:'19 UStG Kleinunternehmer', key: '19 UStG'}, + ], + inputColumn: "Allgemeines", + sortable: true }, { key: "customSurchargePercentage", label: "Individueller Aufschlag",