function loan_generator_schedule_mantenance(amount, duration, start_date) {
    var row = '';


    var end_on = start_date;
        var payment_date = start_date;
        for (i = 1; i <= duration; i++) {
            row += `<tr>
                            <td><label>Step</label></td>
                            <td><input type="text" class="form-control" value="${i}" readonly></td>
                            <td><label>Date</label></td>
                            <td><input type="text" class="form-control loan-date-picker loan-payment-date" value="${payment_date}" readonly></td>
                            <td><label>Amount</label></td>
                            <td><input type="text" class="form-control amount" value="${amount}" readonly></td>
                        </tr>`;

            payment_date = Loan_date_generator(payment_date);

            end_on = payment_date;
        }

    return row;
}
function Loan_date_generator(date) {
    var next_date = date;
    var next_date = next_date.split('-');
    var str_date = next_date[2] + '-' + next_date[1] + '-' + next_date[0];
    var next_date = new Date(str_date);
    next_date.setMonth(next_date.getMonth() + 1);
    var new_next_date = new Date(next_date);
    var dd = new_next_date.getDate();
    var mm = new_next_date.getMonth() + 1;

    var yyyy = new_next_date.getFullYear();
    if (dd < 10) {
        dd = '0' + dd;
    }
    if (mm < 10) {
        mm = '0' + mm;
    }
    return new_next_date = dd + '-' + mm + '-' + yyyy;
}