Subversion Repositories SmartDukaan

Rev

Rev 34355 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34355 Rev 35534
Line 92... Line 92...
92
                }
92
                }
93
            });
93
            });
94
        }
94
        }
95
    });
95
    });
96
 
96
 
-
 
97
    $(document).on('click', '.add-credit-exception', function () {
-
 
98
        var row = $(this).closest("tr");
-
 
99
        var fofoId = $(this).data('fofo-id');
-
 
100
        var partnerName = $(row).find("td:eq(2)").text().trim();
-
 
101
 
-
 
102
        if (confirm("Are you sure you want to add credit exception for today for " + partnerName + "?")) {
-
 
103
            doPostAjaxRequestHandler(context + "/addCreditBlockedException?fofoId=" + fofoId, function (response) {
-
 
104
                if (response === 'true' || response === true) {
-
 
105
                    alert("Credit exception added successfully for today!");
-
 
106
                } else {
-
 
107
                    alert("Failed to add credit exception. Please try again.");
-
 
108
                }
-
 
109
            });
-
 
110
        }
-
 
111
    });
-
 
112
 
97
    $(document).on('click', '.credit-requirement-send', function () {
113
    $(document).on('click', '.credit-requirement-send', function () {
98
        var row = $(this).closest("tr");
114
        var row = $(this).closest("tr");
99
        console.log(row);
115
        console.log(row);
100
        var rowIndex = $(this).closest('tr').prevAll().length;
116
        var rowIndex = $(this).closest('tr').prevAll().length;
101
        console.log(rowIndex);
117
        console.log(rowIndex);