Problem Identification: In Prepayment Invoice distribution line the user has reversed the distribution line and then, the negative amount reversal line he made it zero and validated the invoice. As header amount and distribution are equal. System has validated the invoice. while applying standard invoice to Prepayment system is not showing prepayment invoice.
Solution: From SQL Query, I have verified the AP_Invoices_All and AP_Invoice_distributions_all Tables and found that, reversal_flag column as 'Yes' (Which should be Nil) and Prepayment_remaining_amount column as nil(As prepayment status is available Prepayment_remaining_amount column should have available prepayment amount value). Now, with update SQL Query, we have set Reversal_flag column as null and Prepayment_remaining_amount column with available amount. Now, system show Prepayment invoice, while applying with standard Invoice.
Solution: From SQL Query, I have verified the AP_Invoices_All and AP_Invoice_distributions_all Tables and found that, reversal_flag column as 'Yes' (Which should be Nil) and Prepayment_remaining_amount column as nil(As prepayment status is available Prepayment_remaining_amount column should have available prepayment amount value). Now, with update SQL Query, we have set Reversal_flag column as null and Prepayment_remaining_amount column with available amount. Now, system show Prepayment invoice, while applying with standard Invoice.