|  | @@ -210,12 +210,14 @@ function report_amortization_and_interest(reporting){
 | 
											
												
													
														|  |              columns.push({
 |  |              columns.push({
 | 
											
												
													
														|  |                  field:'description',
 |  |                  field:'description',
 | 
											
												
													
														|  |                  title:'Descripcion',
 |  |                  title:'Descripcion',
 | 
											
												
													
														|  | 
 |  | +                align:'center',
 | 
											
												
													
														|  |                  footerFormatter:'Totales'
 |  |                  footerFormatter:'Totales'
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              columns.push({
 |  |              columns.push({
 | 
											
												
													
														|  |                  field:'date_maturity',
 |  |                  field:'date_maturity',
 | 
											
												
													
														|  |                  title:'Vencimiento',
 |  |                  title:'Vencimiento',
 | 
											
												
													
														|  | 
 |  | +                align:'center',
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              columns.push({
 |  |              columns.push({
 | 
											
										
											
												
													
														|  | @@ -260,7 +262,7 @@ function report_amortization_and_interest(reporting){
 | 
											
												
													
														|  |                  title:'Capital Recuperado',
 |  |                  title:'Capital Recuperado',
 | 
											
												
													
														|  |                  align:'right',
 |  |                  align:'right',
 | 
											
												
													
														|  |                  with:'12%',
 |  |                  with:'12%',
 | 
											
												
													
														|  | -                // footerFormatter:'TotalFormatter'
 |  | 
 | 
											
												
													
														|  | 
 |  | +                footerFormatter:'CapitalReceiveFormatter'
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              columns.push({
 |  |              columns.push({
 | 
											
										
											
												
													
														|  | @@ -268,11 +270,9 @@ function report_amortization_and_interest(reporting){
 | 
											
												
													
														|  |                  title:'Interes Cobrado',
 |  |                  title:'Interes Cobrado',
 | 
											
												
													
														|  |                  align:'right',
 |  |                  align:'right',
 | 
											
												
													
														|  |                  with:'12%',
 |  |                  with:'12%',
 | 
											
												
													
														|  | -                // footerFormatter:'TotalFormatter'
 |  | 
 | 
											
												
													
														|  | 
 |  | +                footerFormatter:'InterestReceiveFormatter'
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |              var AccountMoveLine = self.getAccountMoveLine(number);
 |  |              var AccountMoveLine = self.getAccountMoveLine(number);
 | 
											
												
													
														|  |              var AccountInvoice =  _.flatten(_.filter(self.AccountInvoice,function (item){
 |  |              var AccountInvoice =  _.flatten(_.filter(self.AccountInvoice,function (item){
 | 
											
												
													
														|  |                  return item.number == number;
 |  |                  return item.number == number;
 | 
											
										
											
												
													
														|  | @@ -325,6 +325,12 @@ function report_amortization_and_interest(reporting){
 | 
											
												
													
														|  |                                  }
 |  |                                  }
 | 
											
												
													
														|  |                                  if(saldo < i.debit && band == true){
 |  |                                  if(saldo < i.debit && band == true){
 | 
											
												
													
														|  |                                      residual = i.debit - saldo;
 |  |                                      residual = i.debit - saldo;
 | 
											
												
													
														|  | 
 |  | +                                    if(interest_amount >= saldo){
 | 
											
												
													
														|  | 
 |  | +                                        interest_receive = saldo;
 | 
											
												
													
														|  | 
 |  | +                                    }else{
 | 
											
												
													
														|  | 
 |  | +                                        interest_receive = interest_amount;
 | 
											
												
													
														|  | 
 |  | +                                        capital_receive = saldo - interest_amount;
 | 
											
												
													
														|  | 
 |  | +                                    }
 | 
											
												
													
														|  |                                      band = false;
 |  |                                      band = false;
 | 
											
												
													
														|  |                                  }
 |  |                                  }
 | 
											
												
													
														|  |                              });
 |  |                              });
 | 
											
										
											
												
													
														|  | @@ -357,8 +363,10 @@ function report_amortization_and_interest(reporting){
 | 
											
												
													
														|  |                                  DATOS FORMATADOS
 |  |                                  DATOS FORMATADOS
 | 
											
												
													
														|  |                              ########################
 |  |                              ########################
 | 
											
												
													
														|  |                              */
 |  |                              */
 | 
											
												
													
														|  | -                            'residual_value': residual,
 |  | 
 | 
											
												
													
														|  | -                            'amount_value': item.debit,
 |  | 
 | 
											
												
													
														|  | 
 |  | +                            residual_value:residual,
 | 
											
												
													
														|  | 
 |  | +                            amount_value:item.debit,
 | 
											
												
													
														|  | 
 |  | +                            capital_receive_value:capital_receive,
 | 
											
												
													
														|  | 
 |  | +                            interest_receive_value:interest_receive,
 | 
											
												
													
														|  |                          });
 |  |                          });
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  |                  }
 |  |                  }
 |