tengo una tarea donde me exigen hacer saldo por antiguedad de factura pendiente. para que tenga una idea de lo que necesito, por ejemplo: si tenemos 10 factura pendiente de $100 pesos cada una, de un cliente X y ese mismo cliente desea realizar un abono de 750 pesos. se deben saldar 7 factura y a la factura #8 realizar un abono por los 50 pesos restantes.
Translated:
I have a task where they require me to make a balance due to the outstanding invoice. So that you have an idea of what I need, for example: if we have 10 pending invoices of $ 100 pesos each, from a client X and that same client wants to make a payment of 750 pesos. 7 invoice must be paid and invoice # 8 must be credited for the remaining 50 pesos.
| No. Factura |
Fecha |
Monto Fact. |
Abonado |
Pendiente |
| 1 |
30/11/2021 |
100 |
100 |
0 |
| 2 |
1/12/2021 |
100 |
100 |
0 |
| 3 |
2/12/2021 |
100 |
100 |
0 |
| 4 |
3/12/2021 |
100 |
100 |
0 |
| 5 |
4/12/2021 |
100 |
100 |
0 |
| 6 |
5/12/2021 |
100 |
100 |
0 |
| 7 |
6/12/2021 |
100 |
100 |
0 |
| 8 |
7/12/2021 |
100 |
50 |
50 |
| 9 |
8/12/2021 |
100 |
0 |
100 |
| 10 |
9/12/2021 |
100 |
0 |
100 |
| |
|
|
|
|
| El cliente pago 750 pesos para realizar un abono a su cuenta |
| se deben de auto saldar la x cantidad de factura en base al monto |
| recibido |
|
|
|
|
| |
|
|
|
|