SELECT
*
FROM
Credit_Notes
WHERE
Status <> 'Refunded'
INSERT INTO
Credit_Notes (Contact, Dated_On, Currency, Credit_Note_Items)
VALUES
(
'https://api.freeagent.com/v2/contacts/18494140',
'2024-11-27',
'GBP',
'[{"item_type":"Days","quantity":"1","price":"-999.99","description":"Consultancy Days"}]'
)
UPDATE Credit_Notes
SET
Credit_Note_Items = '[{"item_type":"Days","quantity":"4","price":"-999.99","description":"Consultancy Days"},{"item_type":"Hours","quantity":"32","price":"-172.22","description":"Developer Hours"}]'
WHERE
Id = '73934615'
DELETE FROM Credit_Notes
WHERE
Id = '73934615'