feat(accounting): Skonto bei Zahlungen auf Ausgangs- und Eingangsbelege buchen
Skonto wird an der Bankzuordnung gespeichert und gleicht den Beleg zusammen mit der Zahlung aus. Der Betrag wird anteilig nach Steuersätzen auf die Skontokonten verteilt (Standard SKR03, je Mandant einstellbar), im DATEV-Export als eigene Buchung je Steuersatz ausgegeben und in der USt-Auswertung im Zeitraum der Zahlung berücksichtigt. Schlussrechnungen verteilen den Skonto auf die Restforderung nach Abzug der Abschläge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { sumSettledAllocations } from "~/utils/cashDiscount"
|
||||
import CreateDocumentModal from "~/components/createDocumentModal.vue"
|
||||
import CreateDocumentFromTemplateModal from "~/components/createDocumentFromTemplateModal.vue"
|
||||
import dayjs from "dayjs";
|
||||
@@ -337,10 +338,7 @@ const documentAmounts = computed(() => {
|
||||
|
||||
items.value.forEach((item) => {
|
||||
const amount = sum.getCreatedDocumentSum(item, items.value)
|
||||
const amountPaid = (item.statementallocations || []).reduce(
|
||||
(total, allocation) => total + Number(allocation.amount || 0),
|
||||
0
|
||||
)
|
||||
const amountPaid = sumSettledAllocations(item.statementallocations || [])
|
||||
|
||||
result.set(item.id, {
|
||||
amount,
|
||||
|
||||
Reference in New Issue
Block a user