Changed usenextnumber from supabase to fs
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script setup>
|
||||
import dayjs from "dayjs"
|
||||
import Handlebars from "handlebars"
|
||||
import {useNumberRange} from "~/composables/useNumberRange.js";
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import {useFunctions} from "~/composables/useFunctions.js";
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const profileStore = useProfileStore()
|
||||
@@ -804,14 +804,7 @@ const saveDocument = async (state,resetup = false) => {
|
||||
type = itemInfo.value.type
|
||||
}
|
||||
|
||||
const {data,error} = await supabase.functions.invoke("use_next_number",{
|
||||
body: {
|
||||
tenant: profileStore.currentTenant,
|
||||
numberRange: type
|
||||
}
|
||||
})
|
||||
|
||||
itemInfo.value.documentNumber = data.usedNumber
|
||||
itemInfo.value.documentNumber = await useFunctions().useNextNumber(type) //data.usedNumber
|
||||
|
||||
setDocumentTypeConfig(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user