Added Default Payment Method to Vendors
Added Auto Select to Create incoming
This commit is contained in:
@@ -38,13 +38,14 @@ const itemInfo = ref({
|
||||
const availableDocuments = ref([])
|
||||
const costcentres = ref([])
|
||||
const accounts = ref([])
|
||||
const vendors = ref([])
|
||||
const setup = async () => {
|
||||
let filetype = (await supabase.from("filetags").select().eq("tenant",profileStore.currentTenant).eq("incomingDocumentType","invoices").single()).data.id
|
||||
console.log(filetype)
|
||||
let ids = (await supabase.from("files").select("id").eq("tenant",profileStore.currentTenant).eq("type", filetype).is("incominginvoice",null)).data.map(i => i.id)
|
||||
availableDocuments.value = await useFiles().selectSomeDocuments(ids)
|
||||
accounts.value = (await supabase.from("accounts").select().order("number",{ascending:true})).data
|
||||
|
||||
vendors.value = await useSupabaseSelect("vendors")
|
||||
}
|
||||
|
||||
setup()
|
||||
@@ -230,6 +231,7 @@ const setCostCentre = async (item,data) => {
|
||||
class="flex-auto"
|
||||
searchable-placeholder="Suche..."
|
||||
:color="!itemInfo.vendor ? 'rose' : 'primary'"
|
||||
@change="vendors.find(i => i.id === itemInfo.vendor).defaultPaymentMethod ? itemInfo.paymentType = vendors.find(i => i.id === itemInfo.vendor).defaultPaymentMethod : null"
|
||||
>
|
||||
<template #option="{option}">
|
||||
{{option.vendorNumber}} - {{option.name}}
|
||||
|
||||
@@ -1152,6 +1152,17 @@ export const useDataStore = defineStore('data', () => {
|
||||
inputType: "bool",
|
||||
component: sepa
|
||||
},
|
||||
{
|
||||
key: "defaultPaymentMethod",
|
||||
label: "Standard Zahlungsmethode",
|
||||
inputType: "select",
|
||||
selectValueAttribute: "label",
|
||||
selectManualOptions: [
|
||||
{label:"Einzug"},
|
||||
{label:"Überweisung"},
|
||||
{label:"Kreditkarte"},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "notes",
|
||||
label: "Notizen",
|
||||
|
||||
Reference in New Issue
Block a user