3.0.0 #220

Merged
flfeders merged 676 commits from dev into main 2026-09-20 16:10:48 +00:00
2 changed files with 15 additions and 0 deletions
Showing only changes of commit 769185cd82 - Show all commits

View File

@@ -239,6 +239,13 @@ function isDateValue(value: any) {
}
function normalizeCreatedDocumentPayload(payload: Record<string, any>) {
if (Object.prototype.hasOwnProperty.call(payload, "customSurchargePercentage")) {
const customSurchargePercentage = Number(payload.customSurchargePercentage)
payload.customSurchargePercentage = Number.isFinite(customSurchargePercentage)
? customSurchargePercentage
: 0
}
const numberRelationFields = [
"customer",
"contact",

View File

@@ -1701,6 +1701,7 @@ const saveSerialInvoice = async () => {
const saveDocument = async (state, resetup = false) => {
itemInfo.value.state = state
normalizeCustomSurchargePercentage()
if (state !== "Entwurf") {
console.log("???")
@@ -1870,7 +1871,14 @@ const checkCompatibilityWithInputPrice = () => {
})
}
const normalizeCustomSurchargePercentage = () => {
const percentage = Number(itemInfo.value.customSurchargePercentage)
itemInfo.value.customSurchargePercentage = Number.isFinite(percentage) ? percentage : 0
}
const updateCustomSurcharge = () => {
normalizeCustomSurchargePercentage()
itemInfo.value.rows.forEach(row => {
if (!["pagebreak", "title", "text"].includes(row.mode) && isImportedAdvanceInvoiceRow(row)) {
row.price = Number(row.inputPrice || 0)