group BusinessInvoicePaymentField;

getFieldsForInvoicePayment(payment_id) ::=<<
select
  payment_id
, name
, value
from bip_fields
where payment_id = :payment_id
;
>>

addField(payment_id, name, value) ::=<<
insert into bip_fields (
  payment_id
, name
, value
) values (
  :payment_id
, :name
, :value
);
>>

removeField(payment_id, name) ::= <<
delete from bip_fields where payment_id = :payment_id and name = :name;
>>

test() ::= <<
select 1 from bip_fields;
>>
