SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   if (@Model.IsStoreOwner)
  2.     {
  3.     <script>
  4.         $(function () {
  5.             SetFooter();
  6.         })
  7.         function SetFooter() {                
  8.                 var tfoot = '<tfoot><tr><td class="_220">Total</td><td colspan="@(colspan - 1)" class="_150">&nbsp;</td>';
  9.  
  10.                 @if (Model.Tablemanager.ShowColumn(TableColumns.BuyerPaid))
  11.                 {
  12.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", totalBuyerPaid))</td>';
  13.                 }
  14.                 @if (Model.Tablemanager.ShowColumn(TableColumns.AmazonFee))
  15.                 {
  16.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", totalAmazonFee))</td>';
  17.                 }
  18.  
  19.                 @if (Model.Tablemanager.ShowColumn(TableColumns.PurchaseCost))
  20.                 {
  21.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", Model.AmazonOrders.Sum(f => f.PurchaseCost)))</td>';
  22.                 }
  23.  
  24.                 @if (Model.AmazonOrders.Any(a => a.BuyerRefound != 0) && Model.Tablemanager.ShowColumn(ECom.Admin.Models.Tables.TableColumns.BuyerRefund))
  25.                 {
  26.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", Model.AmazonOrders.Sum(f => f.BuyerRefound)))</td>';
  27.                 }
  28.                 @if (Model.AmazonOrders.Any(a => a.AmazonFeeKept != 0) && Model.Tablemanager.ShowColumn(ECom.Admin.Models.Tables.TableColumns.AmazonFeeKept))
  29.                 {
  30.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", Model.AmazonOrders.Sum(f => f.AmazonFeeKept)))</td>';
  31.                 }
  32.                 @if (Model.AmazonOrders.Any(a => a.SupplierRefunded != 0) && Model.Tablemanager.ShowColumn(ECom.Admin.Models.Tables.TableColumns.SupplierRefunded))
  33.                 {
  34.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", Model.AmazonOrders.Sum(f => f.SupplierRefunded)))</td>';
  35.                 }
  36.  
  37.  
  38.  
  39.                 @if (Model.Tablemanager.ShowColumn(TableColumns.TotalProfit))
  40.                 {
  41.                     @:tfoot += '<td class="text-right">@(CurrencyHelper.GetCurrencySymbol(currency)) @(String.Format("{0:#,0.00}", Model.AmazonOrders.Where(f => f.OrderStatus != AmazonOrderStatusConstants.OOS).Sum(f => f.TotalProfit)))</td>';
  42.                 }
  43.                 tfoot += '<td></td>';
  44.                 tfoot += '</tr></tfoot>';
  45.  
  46.                 $('.slim-table').append(tfoot);
  47.             }        
  48.     </script>
  49.         }
  50.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top