Billing: Calculate prices

This commit is contained in:
2023-11-30 01:44:48 +01:00
parent 17d00a8524
commit 8b9d62ea50
7 changed files with 61 additions and 23 deletions

View File

@ -689,7 +689,7 @@ namespace Elwig.Helpers {
BEGIN
INSERT INTO payment_member (year, avnr, mgnr, net_amount)
VALUES (NEW.year, NEW.avnr, (SELECT mgnr FROM delivery WHERE (year, did) = (NEW.year, NEW.did)), NEW.amount)
ON CONFLICT DO UPDATE SET amount = amount + excluded.amount;
ON CONFLICT DO UPDATE SET net_amount = net_amount + excluded.net_amount;
END;
""");
ExecuteNonQuery(cnx, """