function print_royalty_sales() { $item_id = $_POST['PARAM_0']; global $path_to_root, $systypes_array; if ($destination) { include_once $path_to_root . "/reporting/includes/excel_report.inc"; } else { include_once $path_to_root . "/reporting/includes/pdf_report.inc"; } $result = fetchRoyalty($item_id); $name = ""; while ($book = db_fetch($result)) { $name = $book[1]; } $params = array(0 => $comments, 1 => array('text' => _('Item'), 'from' => $name)); $orientation = $orientation ? 'L' : 'P'; $dec = user_price_dec(); $cols = array(0, 150, 250, 350, 450); $headers = array(_('Name'), _('ID #'), _('Date'), _('Quantity'), _('Status')); $aligns = array('left', 'left', 'left', 'left', 'left'); $usr = get_user($user); $user_id = $usr['user_id']; $rep = new FrontReport(_('Royalty Sales'), "RoyaltySales", user_pagesize(), 9, $orientation); if ($orientation == 'L') { recalculate_cols($cols); } $rep->SetHeaderType('Header'); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); $rep->NewPage(); $rep->TextCol(0, 1, $item_id); $rep->TextCol(2, 4, fetchTitle($item_id)); $rep->NewLine(); $rep->NewLine(); $result = fetchRoyalty($item_id); while ($myrow = db_fetch($result)) { $rep->TextCol(0, 1, $myrow[0]); $rep->TextCol(1, 2, ' ' . $myrow[1]); $rep->TextCol(2, 3, $myrow[2]); $rep->TextCol(3, 4, $myrow[3]); $rep->TextCol(4, 5, 'Closed'); $rep->NewLine(); } $result1 = fetchCreditMemo($item_id); while ($myrow1 = db_fetch($result1)) { if ($myrow1[3] > 0) { $rep->TextCol(0, 1, $myrow1[0]); $rep->TextCol(1, 2, ' ' . $myrow1[1]); $rep->TextCol(2, 3, $myrow1[2]); $rep->TextCol(3, 4, '- ' . $myrow1[3]); $rep->TextCol(4, 5, 'Closed'); $rep->NewLine(); } } $rep->Line($rep->row + 4); $rep->End(); }
function print_royalty_sales() { $from = $_POST['PARAM_0']; $to = $_POST['PARAM_1']; $item = $_POST['PARAM_2']; $status = $_POST['PARAM_3']; $destination = $_POST['PARAM_4']; $orientation = $_POST['PARAM_5']; global $path_to_root, $systypes_array; if ($destination) { include_once $path_to_root . "/reporting/includes/excel_report.inc"; } else { include_once $path_to_root . "/reporting/includes/pdf_report.inc"; } $result = fetchRoyalty($item); $name = ""; while ($book = db_fetch($result)) { $name = $book[1]; } $params = array(0 => $comments, 1 => array('text' => _('Item'), 'from' => $name)); $orientation = $orientation ? 'L' : 'P'; $dec = user_price_dec(); $cols = array(0, 200, 210, 300, 310, 360, 380, 430, 440, 490, 500, 550); $headers = array(_('Client'), '', _('IMC'), '', _('Invoice/CM #'), '', _('Date'), '', _('Quantity'), '', _('Status')); $aligns = array('left', 'left', 'left', 'left', 'right', 'right'); $usr = get_user($user); $user_id = $usr['user_id']; $rep = new FrontReport(_('Royalty Sales'), "RoyaltySales", user_pagesize(), 9, $orientation); if ($orientation == 'L') { recalculate_cols($cols); } $rep->SetHeaderType('Header'); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); $rep->NewPage(); if ($item == '') { $no_title_print = false; $enter = true; } else { $no_title_print = true; $enter = false; } if ($no_title_print) { $rep->Font('bold'); $rep->TextCol(0, 1, $item); $rep->TextCol(2, 10, fetchTitle($item)); $rep->Font(); } $total = 0; $total_invoice_qty = 0; $total_credit_qty = 0; $rep->NewLine(); if ($item == "") { $code = array(); $ItemCode = fetchItemCode(); while ($r = db_fetch($ItemCode)) { array_push($code, $r[0]); } $total = 0; $total_invoice_qty = 0; $total_credit_qty = 0; foreach ($code as $codes) { $result = fetchRoyalty($codes, $status, $from, $to); $bookname = fetchTitle($codes); $rep->Font('bold'); $rep->TextCol(0, 5, $codes . "-" . $bookname); $rep->Font(); $rep->NewLine(); while ($myrow = db_fetch($result)) { if ($myrow['alloc'] == $myrow['ov_amount']) { $stat = 'Closed'; } if ($myrow['alloc'] < $myrow['ov_amount']) { $stat = 'Open'; } $scode = get_code($myrow['salesman']); $salesman = get_salesman_name($myrow['salesman']); $total_invoice_qty += $myrow[3]; $clientName = get_customer_name($myrow[0]); $rep->TextCol(0, 1, $clientName); $rep->TextCol(2, 3, $scode); $rep->TextCol(4, 5, ' ' . $myrow['customized_no']); $rep->TextCol(6, 7, $myrow['tranDate']); $rep->TextCol(8, 9, $myrow['quantity']); $rep->TextCol(10, 11, $stat); $rep->NewLine(); } $result1 = fetchCreditMemo($codes, $status, $from, $to); while ($myrow1 = db_fetch($result1)) { if ($myrow1[3] > 0) { if ($myrow1['alloc'] == $myrow1['ov_amount']) { $stat = 'Closed'; } if ($myrow1['alloc'] < $myrow1['ov_amount']) { $stat = 'Open'; } } $qty = -$myrow1['quantity']; $total_credit_qty += $qty; $scode = get_code($myrow1['salesman']); $clientName2 = get_customer_name($myrow1[0]); $rep->TextCol(0, 1, $clientName2); $rep->TextCol(2, 3, $scode); $rep->TextCol(4, 5, ' ' . $myrow1['customized_no']); $rep->TextCol(6, 7, $myrow1['tranDate']); $rep->TextCol(8, 9, $qty); $rep->TextCol(10, 11, $stat); $rep->NewLine(); } $rep->NewLine(1); $total = $total_invoice_qty + $total_credit_qty; $rep->Font('bold'); $rep->TextCol(6, 7, _("Total")); $rep->TextCol(8, 9, $total); $rep->Line($rep->row + 10); $rep->Font(); $rep->NewLine(); $total = 0; $total_invoice_qty = 0; $total_credit_qty = 0; } } else { $result = fetchRoyalty($item, $status, $from, $to); while ($myrow = db_fetch($result)) { if ($myrow['alloc'] == $myrow['ov_amount']) { $stat = 'Closed'; } if ($myrow['alloc'] < $myrow['ov_amount']) { $stat = 'Open'; } $scode = get_code($myrow['salesman']); $salesman = get_salesman_name($myrow['salesman']); $total_invoice_qty += $myrow[3]; $clientName = get_customer_name($myrow[0]); $rep->TextCol(0, 1, $clientName); $rep->TextCol(2, 3, $scode); $rep->TextCol(4, 5, ' ' . $myrow['customized_no']); $rep->TextCol(6, 7, $myrow['tranDate']); $rep->TextCol(8, 9, $myrow['quantity']); $rep->TextCol(10, 11, $stat); $rep->NewLine(); } $result1 = fetchCreditMemo($item, $status, $from, $to); while ($myrow1 = db_fetch($result1)) { if ($myrow1[3] > 0) { if ($myrow1['alloc'] == $myrow1['ov_amount']) { $stat = 'Closed'; } if ($myrow1['alloc'] < $myrow1['ov_amount']) { $stat = 'Open'; } $qty = -$myrow1['quantity']; $total_credit_qty += $qty; $scode = get_code($myrow1['salesman']); $clientName2 = get_customer_name($myrow1[0]); $rep->TextCol(0, 1, $clientName2); $rep->TextCol(2, 3, $scode); $rep->TextCol(4, 5, ' ' . $myrow1['customized_no']); $rep->TextCol(6, 7, $myrow1['tranDate']); $rep->TextCol(8, 9, $qty); $rep->TextCol(10, 11, $stat); $rep->NewLine(); } } $rep->NewLine(1); $total = $total_invoice_qty + $total_credit_qty; $rep->Font('bold'); $rep->TextCol(6, 7, _("Total")); $rep->TextCol(8, 9, $total); $rep->Line($rep->row + 10); $rep->NewLine(); $total = 0; $total_invoice_qty = 0; $total_credit_qty = 0; } $rep->End(); }
?> "><?php echo fetchViewCSVData(); ?> </a></li> </ul> </li> </ul> <ul> <li class="open leftExportOptions" > <h4><?php echo fetchTitle("exportOptions"); ?> </h4> <ul class="menuExportOptions"> <li><a href="javascript:" id="toolUrlExportProxy" class="exportAction proxyAble"><?php echo fetchLinkTitle("toolUrlExport"); ?> </a></li> <li><a href="javascript:" id="pngExportProxy" class="exportAction proxyAble" target="_blank"><?php echo fetchLinkTitle("pngExport"); ?> </a></li> <li><a href="javascript:" id="htmlExportProxy" class="exportAction proxyAble"><?php echo fetchLinkTitle("htmlExport"); ?> </a></li>
echo $survey; ?> "> <input name="media" id="media" type="hidden" value="png"> <input name="width" type="hidden" id="pngWidth" value="740"> </section> <?php ///////// VISUALIZATION MAIN PARAMETERS START ///////////////////////// ?> <section class="questionSection"> <header> <h2><?php echo fetchTitle("plotParameters"); ?> </h2> </header> <label id="label_topic" class="hidden"> <span><?php echo fetchLabel("topic"); ?> :</span> <select id="topic"> <option value="">Please enable Javascript</option> </select> </label> <label id="label_question">
} //----------------------------- if (!empty($_GET["locale"])) { $parameter = $_GET["locale"]; if (in_array($parameter, $surveyLocales)) { $locale = $parameter; } } //----------------------------- require_once "model/" . $survey . "/php/" . $locale . ".php"; require_once "model/fetchTranslation.php"; $printStandaloneExportOptions = true; ///////////////////////////////////////////////// // SEO google enhancement ///////////////////////////////////////////////// $pageTitle = fetchTitle("survey"); $visualizationUrl = "/DVS/render/?locale=EN&dataSource=3RDEQLS&media=png&width=740&question=Y11_Q8_PreferredWorkingHours&plot=heatMap&countryGroup=linear&subset=Y11_Agecategory&subsetValue=All&answer=1--Work-less"; $visualizationDescription = fetchTooltip("heatMap"); require_once '../render/VL/validParametersFunctions.php'; if (isPlotParametersValid($_GET)) { $pageTitle .= " : " . fetchValue($_GET['plot'], fetchVisualizations()) . ", " . fetchLabel("question") . " : " . $_GET['question']; $visualizationUrl = "/DVS/render/?" . $_SERVER['QUERY_STRING']; $plotDescriptionFileName = getPlotBodyFileName($_GET); $plotDescriptionFileName = substr($plotDescriptionFileName, 0, strlen($plotDescriptionFileName) - 4); //remove the width $plotDescriptionFileName = "/DVS/render/plots/txt/" . $plotDescriptionFileName . ".htm"; if (file_exists($plotDescriptionFileName)) { $visualizationDescription = file_get_contents($plotDescriptionFileName, true); $visualizationDescription = trim($visualizationDescription); } }