1 namespace('kivi.CustomerVendorTurnover', function(ns) {
3 ns.show_dun_stat = function(period) {
5 var url = 'controller.pl?action=CustomerVendorTurnover/count_open_items_by_year&id=' + $('#cv_id').val();
8 var url = 'controller.pl?action=CustomerVendorTurnover/count_open_items_by_month&id=' + $('#cv_id').val();
13 ns.get_invoices = function() {
14 var url = 'controller.pl?action=CustomerVendorTurnover/get_invoices&id=' + $('#cv_id').val() + '&db=' + $('#db').val();
15 $('#invoices').load(url);
18 ns.get_sales_quotations = function() {
19 var url = 'controller.pl?action=CustomerVendorTurnover/get_orders&id=' + $('#cv_id').val() + '&db=' + $('#db').val() + '&type=quotation';
20 $('#quotations').load(url);
23 ns.get_orders = function() {
24 var url = 'controller.pl?action=CustomerVendorTurnover/get_orders&id=' + $('#cv_id').val() + '&db=' + $('#db').val() + '&type=order';
25 $('#orders').load(url);
28 ns.get_letters = function() {
29 var url = 'controller.pl?action=CustomerVendorTurnover/get_letters&id=' + $('#cv_id').val() + '&db=' + $('#db').val();;
30 $('#letters').load(url);
33 ns.get_mails = function() {
34 var url = 'controller.pl?action=CustomerVendorTurnover/get_mails&id=' + $('#cv_id').val() + '&db=' + $('#db').val();;
35 $('#mails').load(url);
38 ns.show_turnover_stat = function(period) {
40 var url = 'controller.pl?action=CustomerVendorTurnover/turnover_by_year&id=' + $('#cv_id').val() + '&db=' + $('#db').val();
41 $('#turnovers').load(url);
43 var url = 'controller.pl?action=CustomerVendorTurnover/turnover_by_month&id=' + $('#cv_id').val() + '&db=' + $('#db').val();
44 $('#turnovers').load(url);