chore(): 1.0.0
This commit is contained in:
@@ -46,18 +46,32 @@ export function generatePodsumowanieStawekPodatkuVat(faktura: Faktura): Content[
|
||||
|
||||
const definedHeader: Content[] = [
|
||||
...[{ text: 'Lp.', style: FormatTyp.GrayBoldTitle }],
|
||||
...(AnyP13P14_5Diff0 ? [{ text: 'Stawka podatku', style: FormatTyp.GrayBoldTitle }] : []),
|
||||
...(AnyP13P14_5Diff0 || hasValue(faktura.Fa?.P_14_5)
|
||||
? [
|
||||
{
|
||||
text: 'Stawka podatku',
|
||||
style: FormatTyp.GrayBoldTitle,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(AnyP13 ? [{ text: 'Kwota netto', style: FormatTyp.GrayBoldTitle }] : []),
|
||||
...(AnyP13P14_5Diff0 ? [{ text: 'Kwota podatku', style: FormatTyp.GrayBoldTitle }] : []),
|
||||
...(AnyP13P14_5Diff0 || hasValue(faktura.Fa?.P_14_5)
|
||||
? [
|
||||
{
|
||||
text: 'Kwota podatku',
|
||||
style: FormatTyp.GrayBoldTitle,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(AnyP13 ? [{ text: 'Kwota brutto', style: FormatTyp.GrayBoldTitle }] : []),
|
||||
...(AnyP_14xW ? [{ text: 'Kwota podatku PLN', style: FormatTyp.GrayBoldTitle }] : []),
|
||||
];
|
||||
|
||||
const widths: Content[] = [
|
||||
...['auto'],
|
||||
...(AnyP13P14_5Diff0 ? ['*'] : []),
|
||||
...(AnyP13P14_5Diff0 || hasValue(faktura.Fa?.P_14_5) ? ['*'] : []),
|
||||
...(AnyP13 ? ['*'] : []),
|
||||
...(AnyP13P14_5Diff0 ? ['*'] : []),
|
||||
...(AnyP13P14_5Diff0 || hasValue(faktura.Fa?.P_14_5) ? ['*'] : []),
|
||||
...(AnyP13 ? ['*'] : []),
|
||||
...(AnyP_14xW ? ['*'] : []),
|
||||
];
|
||||
@@ -70,13 +84,23 @@ export function generatePodsumowanieStawekPodatkuVat(faktura: Faktura): Content[
|
||||
|
||||
data.push(item.no);
|
||||
if (AnyP13P14_5Diff0) {
|
||||
data.push(item.taxRateString);
|
||||
if (item.taxRateString) {
|
||||
data.push(item.taxRateString);
|
||||
} else if (getValue(faktura.Fa?.P_13_5)) {
|
||||
data.push('OSS');
|
||||
} else {
|
||||
data.push('');
|
||||
}
|
||||
} else if (hasValue(faktura.Fa?.P_14_5)) {
|
||||
data.push('OSS');
|
||||
}
|
||||
if (AnyP13) {
|
||||
data.push(formatText(item.net, FormatTyp.Currency));
|
||||
}
|
||||
if (AnyP13P14_5Diff0) {
|
||||
data.push(formatText(item.tax, FormatTyp.Currency));
|
||||
} else if (hasValue(faktura.Fa?.P_14_5)) {
|
||||
data.push(getValue(faktura.Fa?.P_14_5) as string);
|
||||
}
|
||||
if (AnyP13) {
|
||||
data.push(formatText(item.gross, FormatTyp.Currency));
|
||||
@@ -162,10 +186,10 @@ export function getSummaryTaxRate(fa: Fa): TaxSummaryTypes[] {
|
||||
summary.push({
|
||||
no,
|
||||
net: getNumberRounded(fa.P_13_5).toFixed(2),
|
||||
gross: getNumberRounded(fa.P_13_5).toFixed(2),
|
||||
gross: (getNumberRounded(fa.P_13_5) + getNumberRounded(fa.P_14_5)).toFixed(2),
|
||||
tax: getNumberRounded(fa.P_14_5).toFixed(2),
|
||||
taxPLN: '',
|
||||
taxRateString: getValue(fa.P_14_5) != 0 ? 'niepodlegające opodatkowaniu' : '',
|
||||
taxRateString: getValue(fa.P_14_5) != 0 ? 'OSS' : '',
|
||||
});
|
||||
no++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user