Leeren individuellen Aufschlag normalisieren
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user