Payment and Refund Scenario
I purchased a product for 178 in BRM and collected its payment using PCM_OP_PYMT_COLLECT and then cancelled the product due to which an /item/refund of 178 was created in table item_t with due=-178
I purchased a product for 107 and ran billing in BRM and it updated the BRM billinfo to -61 but the previous /item/refund remained in table item_t with due -178 and status
I ran PCM_OP_PYMT_COLLECT and it gave description as below Minimum and did not collect payment of 107
I tried to create a refund item using PCM_OP_BILL_ITEM_REFUND which gave NULL poid pointer in return flist and no /item/refund was created in item_t as /item/refund existed in table item_t with status 2 and due -178