Subversion Repositories SmartDukaan

Rev

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

Rev 34389 Rev 34397
Line 64... Line 64...
64
                    <tr>
64
                    <tr>
65
                        <td class="brandStock" data-fofoid="$cr.getKey()" data-toggle="modal"
65
                        <td class="brandStock" data-fofoid="$cr.getKey()" data-toggle="modal"
66
                            data-target="#itemWiseBrandStock">$cr.getValue().getBusinessName()</td>
66
                            data-target="#itemWiseBrandStock">$cr.getValue().getBusinessName()</td>
67
                        <td>$cr.getValue().getCode()</td>
67
                        <td>$cr.getValue().getCode()</td>
68
 
68
 
69
                        <td>$fofoIdPartnerTypeMap.get($cr.getKey())</td>
69
                        <td>$fofoIdPartnerTypeMap.get($cr.getKey())
-
 
70
                            <input type="hidden" class="shortInvestment-mk"
-
 
71
                                   value=" data-shortinvestment="$partnerDailyInvestmentMap.get($cr.getKey()).getShortInvestment()
-
 
72
                            ">
-
 
73
                        </td>
70
                        <td>$partnerSalesHeadersMap.get($cr.getKey()).getTerritoryManager()</td>
74
                        <td>$partnerSalesHeadersMap.get($cr.getKey()).getTerritoryManager()</td>
71
 
75
 
72
                        <td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getWalletAmount()</td>
76
                        <td class="currency">$partnerDailyInvestmentMap.get($cr.getKey()).getWalletAmount()</td>
73
 
77
 
74
 
78
 
Line 326... Line 330...
326
 
330
 
327
    $('#partnerBrandWiseDetail').on('click', '.brandStock', function () {
331
    $('#partnerBrandWiseDetail').on('click', '.brandStock', function () {
328
        var fofoId = $(this).data('fofoid');
332
        var fofoId = $(this).data('fofoid');
329
        var brand = $(this).data('brand');
333
        var brand = $(this).data('brand');
330
 
334
 
-
 
335
        var $row = $(this).closest('tr');
-
 
336
 
-
 
337
        // Get the short-invest value from the same row
-
 
338
        var shortInvest = $row.find('.shortInvestment-mk').text().trim();
331
        console.log(brand)
339
        console.log(shortInvest)
332
 
340
 
333
        doGetAjaxRequestHandler(context + "/getPartnerShortageStock?brand=" + brand + "&fofoId="
341
        doGetAjaxRequestHandler(context + "/getPartnerShortageStock?brand=" + brand + "&fofoId=" + fofoId + "&shortInvest=" + shortInvest, function (response) {
334
                + fofoId, function (response) {
-
 
335
 
342
 
336
            $('#itemWiseBrandStock .modal-content').html(response);
343
            $('#itemWiseBrandStock .modal-content').html(response);
337
            getPartnerShortageStockDetail(fofoId, brand);
344
            getPartnerShortageStockDetail(fofoId, brand, shortInvest);
338
 
345
 
339
        });
346
        });
340
    });
347
    });
341
 
348
 
342
    // $(document).on('click', '.brandFocusedStockDetail', function () {
349
    // $(document).on('click', '.brandFocusedStockDetail', function () {
Line 350... Line 357...
350
 
357
 
351
    function getPartnerShortageStockDetail(fofoId, brand) {
358
    function getPartnerShortageStockDetail(fofoId, brand) {
352
        console.log("fdwfdw");
359
        console.log("fdwfdw");
353
        doGetAjaxRequestHandler(
360
        doGetAjaxRequestHandler(
354
                context + "/getPartnerShortageStockDetail?brand=" + brand + "&fofoId="
361
                context + "/getPartnerShortageStockDetail?brand=" + brand + "&fofoId="
355
                + fofoId, function (response) {
362
                + fofoId + "&shortInvest=" + shortInvest, function (response) {
356
 
363
 
357
                    $('#itemWiseBrandStockDetail').html(response);
364
                    $('#itemWiseBrandStockDetail').html(response);
358
 
365
 
359
                });
366
                });
360
    }
367
    }