Since v4.0 the invoice record is a credit note if the invoice is < 0. If the user is gonna create a credit note, we need to add a restriction to the field Tipo comprobante so the user must select tipo de comprobante of credit not if total_amount is < 0 or tipos de comprobante (factura A, factura B, factura, etc) if total_amount is >=0.
Since v4.0 the invoice record is a credit note if the invoice is < 0. If the user is gonna create a credit note, we need to add a restriction to the field Tipo comprobante so the user must select tipo de comprobante of credit not if total_amount is < 0 or tipos de comprobante (factura A, factura B, factura, etc) if total_amount is >=0.