Billing: fix calculation

This commit is contained in:
2023-11-02 11:57:38 +01:00
parent 193b4688d3
commit 9f67448b72
20 changed files with 327 additions and 117 deletions

View File

@ -89,18 +89,16 @@ namespace Elwig.Dialogs {
FROM v_delivery v
JOIN delivery_part p ON (p.year, p.did, p.dpnr) = (v.year, v.did, v.dpnr)
WHERE v.year = {Year}
ORDER BY v.sortid, v.abgewertet ASC,
COALESCE(LENGTH(v.attributes), 0) ASC, attribute_prio DESC, COALESCE(v.attributes, '~'),
v.kmw DESC, v.lsnr, v.dpnr
ORDER BY v.sortid, v.abgewertet ASC, v.attribute_prio DESC, COALESCE(v.attrid, '~'), v.kmw DESC, v.lsnr, v.dpnr
""")
.ToListAsync();
using var doc = Document.Merge(list.Select(m =>
new DeliveryConfirmation(Context, Year, m, deliveries.Where(d => d.Delivery.MgNr == m.MgNr).ToList()) {
DoubleSided = true
//DoubleSided = true
}
));
doc.DoubleSided = true;
//doc.DoubleSided = true;
await doc.Generate(new Progress<double>(v => {
ProgressBar.Value = v;
}));