X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fic%2Fsales_price_information.html;h=4f5794cb40240e9e619a10d2dfbecd8fe9895eb0;hb=bca1207918502291b707557e530833aab45b42f3;hp=d7b92bd15e45f3839814ea74fc977edc3c13c6b8;hpb=67079598f8f98a12e12a8acddc3afbf12bb58c5d;p=kivitendo-erp.git diff --git a/templates/webpages/ic/sales_price_information.html b/templates/webpages/ic/sales_price_information.html index d7b92bd15..4f5794cb4 100644 --- a/templates/webpages/ic/sales_price_information.html +++ b/templates/webpages/ic/sales_price_information.html @@ -20,9 +20,12 @@ 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; });