merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 9dc5fe1e05c4819a83a35324c0286b472d26298a
parent aefaa46df3e5ee4fca6adf8ed84a6d0a78533bdb
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 26 Dec 2025 18:36:35 +0100

also allow products to have a pot associated with them

Diffstat:
Msrc/backenddb/merchant-0028.sql | 31+++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/backenddb/merchant-0028.sql b/src/backenddb/merchant-0028.sql @@ -85,18 +85,6 @@ COMMENT ON COLUMN merchant_product_groups.product_group_description IS 'Human-readable description for the group'; -ALTER TABLE merchant_inventory - ADD COLUMN product_group_serial INT8 DEFAULT (NULL) - REFERENCES merchant_product_groups (product_group_serial) - ON DELETE SET NULL, - ADD COLUMN price_is_net BOOL DEFAULT (FALSE); - -COMMENT ON COLUMN merchant_inventory.product_group_serial - IS 'Specifies the product group a given product is a member of. If NULL, the product is in the __default__ group'; -COMMENT ON COLUMN merchant_inventory.price_is_net - IS 'If true, the price given is the net price; if false, it is the gross price.'; - - CREATE TABLE merchant_money_pots (money_pot_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY ,merchant_serial BIGINT NOT NULL @@ -120,5 +108,24 @@ COMMENT ON COLUMN merchant_money_pots.pot_total IS 'Total amount in the pot'; +ALTER TABLE merchant_inventory + ADD COLUMN product_group_serial INT8 DEFAULT (NULL) + REFERENCES merchant_product_groups (product_group_serial) + ON DELETE SET NULL, + ADD COLUMN money_pot_serial INT8 DEFAULT (NULL) + REFERENCES merchant_money_pots (money_pot_serial) + ON DELETE SET NULL, + ADD COLUMN price_is_net BOOL DEFAULT (FALSE); + +COMMENT ON COLUMN merchant_inventory.product_group_serial + IS 'Specifies the product group a given product is a member of. If NULL, the product is in the __default__ group'; +COMMENT ON COLUMN merchant_inventory.money_pot_serial + IS 'Specifies that sales amounts of this product (excluding taxes on the product that have their own pot specified) should by default be added to the given money pot. If NULL, the money pot rules of the overall order apply instead.'; +COMMENT ON COLUMN merchant_inventory.price_is_net + IS 'If true, the price given is the net price; if false, it is the gross price.'; + + + + COMMIT;