]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/ic/sales_price_information.html
epic-ts
[mfinanz.git] / templates / webpages / ic / sales_price_information.html
index d7b92bd15e45f3839814ea74fc977edc3c13c6b8..4f5794cb40240e9e619a10d2dfbecd8fe9895eb0 100644 (file)
     get_report(target, event.target + '', {});
   }
 
-  $(document).ready(function(){
-    get_report('#sales_price_information_sales_order', 'controller.pl', { action: 'SellPriceInformation/list', 'filter.part.id': [% id %], 'filter.order.type': 'sales_order' });
-    get_report('#sales_price_information_sales_quotation', 'controller.pl', { action: 'SellPriceInformation/list', 'filter.part.id': [% id %], 'filter.order.type': 'sales_quotation' });
+  $('.tabwidget').on('tabsbeforeactivate', function(event, ui){
+    if (ui.newPanel.attr('id') == 'sales_price_information') {
+      get_report('#sales_price_information_sales_order', 'controller.pl', { action: 'SellPriceInformation/list', 'filter.part.id': [% id %], 'filter.order.type': 'sales_order' });
+      get_report('#sales_price_information_sales_quotation', 'controller.pl', { action: 'SellPriceInformation/list', 'filter.part.id': [% id %], 'filter.order.type': 'sales_quotation' });
+    }
+    return 1;
   });