Solution : https://service.sap.com/sap/support/notes/198789 (SAP Service marketplace login required)
Summary : 
      When creating a billing document with down payment clearing in SAP, the error F5704 'Inconsistent amounts' can occur. The error stems from a cash discount clearing item being erroneously generated during posting. Key components involved include AC_DOWNPAYMENT_CHARGE, SAPLFACI, and ACCCR-WSKTO. The resolution is applied in SAP Release 4.6C through a program correction specification.
Key words : 
system generates error message f5704 'inconsistent amounts', additional key words ac_downpayment_charge, cash discount clearing item, billing document, acccr-wskto, program correction, prerequisites
Related Notes : 
       
| 113347 | Down payment process. as of Release 4.0x (standard) |