<?php include '../includes/db.php'; require_once '../includes/connecti.php'; /** @var $mysqli mysqli */ require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $conn = oci_connect($db_user, $db_pass, $db_host); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('purchase', $_POST['purchase_shipping_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if (substr($key, 0, 9) == "purchase_" && $key != "purchase_supplier" && $key != "purchase_godown" && $key != "purchase_acc_code" && $key != "purchase_notype" && $key != "purchase_id" && $key != "purchase_currency_value") { if (strlen($key) > 18 && substr($key, 0, 18) == "purchase_shipment_" || strlen($key) > 14 && substr($key, 0, 14) == "purchase_bank_") { // do nothing with these values, will be handled further ahead. } else { if ($key == "purchase_shipping_date") { $key = "shipping_date"; $val = my_sql_date($val); } if ($key == "purchase_receive_date") {
<?php @session_start(); require_once '../includes/connecti.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report']) && $_GET['report'] == 'true') { updateDate('rpt_purchase_invoice_start', $_GET['date_start']); updateDate('rpt_purchase_invoice_end', $_GET['date_end']); require_once '../includes/PDFReport.class.php'; class PDF extends PDFReport { function printHeader() { global $showimport, $recDate, $shipDate, $godown, $partyName, $pid, $billNo; $this->SetFont('Arial', 'B', 10); $col1 = 30; $col2 = 50; $col3 = 30; $col4 = 50; $xspace = 80 - $col2; $pdata = array("Invoice #", $pid, "Bill No", $billNo, "Vendor", $partyName, "Warehouse", $godown, "Ship Date", $shipDate, "Receive Date", $recDate); for ($i = 0; $i < count($pdata); $i += 4) { $border = "0"; if (strlen($pdata[$i + 0]) > 0) { $border = 'B'; } $this->Cell($col1, 6, $pdata[$i + 0], 0, 0, 'L'); $this->Cell($col2, 6, $pdata[$i + 1], $border, 0, 'L');
@session_start(); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_party_ledger_start', $date_start); updateDate('rpt_party_ledger_end', $date_end); $accounts = array(); foreach ($_GET['account'] as $account) { if ($account == '#ALL#') { continue; } $accounts[] = $account; } if (count($accounts) == 0) { //all was selected require_once '../includes/connect.php'; $items = mysql_query("SELECT coa.account_ref_id\n" . " FROM chart_of_account coa\n" . " INNER JOIN party p ON p.account_ref_id = coa.account_ref_id\n" . " WHERE p.party_city = '{$_GET['city']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name"); while ($row = mysql_fetch_assoc($items)) { $accounts[] = $row['account_ref_id']; } }
<?php session_start(); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report'])) { updateDate('rpt_inventory_movement_start', $_GET['date1']); updateDate('rpt_inventory_movement_end', $_GET['date2']); $item = array(); $result = $mysqli->query("SELECT im.i_code, im.cno, im.manufacturer_no, im.description, im.company_ref_id FROM item_master im WHERE i_code = {$_GET['item_hidden']}"); if ($row = $result->fetch_assoc()) { $item = $row; } $date1 = $_GET['date1']; if (strlen($date1) < 1) { $date1 = getFinancialStartDate(); } $where = " AND TO_DAYS(trans_date) >= TO_DAYS('" . my_sql_date($date1) . "')\n"; if (strlen($_GET['date2']) > 0) { $where .= " AND TO_DAYS(trans_date) <= TO_DAYS('" . my_sql_date($_GET['date2']) . "')\n"; } $data = array(); $result = $mysqli->query("SELECT g.g_name FROM godown g WHERE g.company_ref_id = {$item['company_ref_id']}"); while ($row = $result->fetch_assoc()) { $gname = $row['g_name']; $data["{$gname}"] = array(); $data["{$gname}"]['total'] = (double) 0; $data["{$gname}"]['opening_balance'] = (double) 0;
session_start(); require_once '../includes/connect.php'; require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_ledger_class_start', $date_start); updateDate('rpt_ledger_class_end', $date_end); $accounts = array(); $items = mysql_query("SELECT coa.account_ref_id\n" . " FROM chart_of_account coa\n" . " WHERE coa.account_class = '{$_GET['account_class']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name"); while ($row = mysql_fetch_assoc($items)) { $accounts[] = $row['account_ref_id']; } $ledger = array(); foreach ($accounts as $account) { $ledger[] = getLedgerData($account, $_GET['report'], $date_start, $date_end); } $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/ledger.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/ledger.xls.php';
<?php include '../includes/connect.php'; require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ include '../includes/JSON.php'; @session_start(); $selected_company_id = $_SESSION['company_id']; $login_user_name = $_SESSION['user_name']; ob_start(); dump($_POST); $data = array(); updateDate('cash_book', $_POST['cash_book_date']); $cash_book_date = my_sql_date($_POST['cash_book_date']); if ($_POST['oper'] == 'delete') { $cash_book_id = $_POST['cb_id']; $voucher_id = getValue("voucher_id", "voucher_detail", "voucher_id = (SELECT voucher_id FROM cash_book WHERE cb_id = {$cash_book_id})", true); d_mysql_query("DELETE FROM voucher_detail WHERE voucher_id = {$voucher_id}"); d_mysql_query("DELETE FROM voucher_master WHERE voucher_id = {$voucher_id}"); d_mysql_query("DELETE FROM cash_book WHERE cb_id = {$cash_book_id}"); } else { $v_cash_acc_id = $_POST['cash_book_id']; $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $counter = $_POST['counter'] * 1; for ($i = 1; $i <= $counter; $i++) { $account_code = $_POST["account_" . $i . "_hidden"]; $cash_book_ammount = 0; $cash_book_type = ""; if (isset($_POST["inp3_{$i}"])) {
session_start(); $conn = oci_connect($db_user, $db_pass, $db_host); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_account_outstanding_start', $date_start); updateDate('rpt_account_outstanding_end', $date_end); $outstanding = array(); $outstanding[] = getOutstandingData($_GET['account_category'], $_GET['report'], $date_start, $date_end, false); $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/outstanding.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/outstanding.xls.php'; } } } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<?php session_start(); $conn = oci_connect($db_user, $db_pass, $db_host); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report']) && $_GET['report'] == 'true') { updateDate('rpt_sales_invoice_start', $_GET['date_start']); updateDate('rpt_sales_invoice_end', $_GET['date_end']); require_once '../includes/PDFReport.class.php'; require_once '../includes/fpdf.rotate.php'; class PDF extends PDFReport { function printHeader() { global $title, $invoice, $partyName, $billno, $partyCity, $date, $billteNo, $transporter, $address, $godown, $aob, $amt; $this->SetFillColor(255, 255, 255); $col1 = 20; $col2 = 60; $col3 = 15; $col4 = 20; $col5 = 25; $col6 = 30; $xspace = 10; $pdata = array(); if ($partyName != 'Cash') { $pdata = array("Customer", $partyName, "Inv#", $invoice, "Date", $date, "Address", $address, "Bilty #", $billteNo, "Amount this Bill", number_format($amt, 0), "City", $partyCity, "Challan#", $billno, "Previous Balance", number_format($aob, 0), "Transporter", $transporter, "Godown", $godown, "Total Balance", number_format($aob + $amt, 0)); } else {
<?php session_start(); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { updateDate('rpt_godown_stock_start', $_GET['date1']); updateDate('rpt_godown_stock_end', $_GET['date2']); if ($_GET['detail'] == 'detail') { include_once '../reports/godown_stock_old.php'; } else { if ($_GET['detail'] == 'compact') { include_once '../reports/godown_stock_new.php'; } } } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="shortcut icon" href="../images/logo_icon.gif"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../stylesheets/style.css" rel="stylesheet" type="text/css" /> <title><?php echo $_SESSION['companyname']; ?> - Reports</title> <?php include '../includes/js.php'; ?>
<?php include '../includes/connect.php'; include_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('delivery_chalan', $_POST['delivery_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if ($key == "delivery_date" || $key == "delivery_party_hidden" || $key == "delivery_godown_hidden" || $key == "delivery_billno" || $key == "delivery_remarks") { if ($key == "delivery_date") { $val = my_sql_date($val); } if ($key == "delivery_party_hidden") { $key = "party_code"; } if ($key == "delivery_godown_hidden") { $key = "g_code"; } if ($key == "delivery_billno") {
@session_start(); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_account_ledger_start', $date_start); updateDate('rpt_account_ledger_end', $date_end); $ledger = array(); $ledger[] = getLedgerData_summary($_GET['account_hidden'], $_GET['report'], $date_start, $date_end); $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/ledger_summary.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/ledger_summary.xls.php'; } else { if ($_GET['report'] == 'htm') { include '../includes/JSON.php'; $json = new Services_JSON(); $output = $json->encode($ledger); print $output; }
<?php session_start(); $conn = oci_connect($db_user, $db_pass, $db_host); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report']) && $_GET['report'] == 'true') { updateDate('rpt_sales_return_start', $_GET['date1']); updateDate('rpt_sales_return_end', $_GET['date2']); require_once '../includes/PDFReport.class.php'; class PDF extends PDFReport { function printHeader() { global $date, $billNo, $partyName; $this->SetFont('Arial', 'B', 8); $col1 = 30; $col2 = 50; $col3 = 30; $col4 = 50; $xspace = 80 - $col2; $pdata = array("Date", $date, "Bill #", $billNo, "Party", $partyName, "", ""); for ($i = 0; $i < count($pdata); $i += 4) { $border = "0"; if (strlen($pdata[$i + 0]) > 0) { $border = 'B'; } $this->Cell($col1, 6, $pdata[$i + 0], 0, 0, 'L');
require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_account_class_start', $date_start); updateDate('rpt_account_class_end', $date_end); $outstanding = array(); $outstanding[] = getOutstandingData($_GET['account_class'], $_GET['report'], $date_start, $date_end, false, true); $mysqli->close(); if ($_GET['report'] == 'pdf') { include_once '../reports/outstanding.pdf.php'; } else { if ($_GET['report'] == 'xls') { include_once '../reports/outstanding.xls.php'; } } } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<?php include '../includes/connect.php'; include_once '../includes/connecti.php'; /** @var $mysqli mysqli */ require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('sales_return', $_POST['sales_return_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if ($key == "sales_return_date" || $key == "sales_return_remarks" || $key == "sales_return_party_hidden" || $key == "sales_return_billno" || $key == "sales_return_type" || $key == "sales_return_godown_hidden") { if ($key == "sales_return_date") { $key = "rsale_date"; $val = my_sql_date($val); } if ($key == "sales_return_party_hidden") { $key = "party_code"; } if ($key == "sales_return_godown_hidden") { $key = "g_code";
<?php session_start(); require_once '../includes/connecti.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { updateDate('rpt_cash_movement_start', $_GET['date_start']); updateDate('rpt_cash_movement_end', $_GET['date_end']); $data = array(); $tdata = array(); $accounts_classes = array('BANKS' => 'Karachi Region', 'LHR BANKS' => 'Lahore Region'); foreach ($accounts_classes as $accounts_class => $accounts_class_name) { $sdata = array(); $openingBalance = (double) 0; $sql = "SELECT coa.account_ref_id FROM chart_of_account coa WHERE coa.account_class = '{$accounts_class}' AND coa.company_ref_id = {$_SESSION['company_id']}"; $result = $mysqli->query($sql); while ($row = $result->fetch_assoc()) { $aob = getOpeningBalance($row['account_ref_id'], $_GET['date_start']); $openingBalance += $aob; } $sdata[] = array('account_name' => $accounts_class . " OPEN BAL", 'amount' => $openingBalance); $runningBalance = (double) 0; $sql = "" . "SELECT IFNULL(SUM(vd.debit_amount), 0) bal\n" . " FROM voucher_detail vd\n" . " INNER JOIN voucher_master vm ON vm.voucher_id = vd.voucher_id\n" . " WHERE TO_DAYS(vm.voucher_date) >= TO_DAYS('" . my_sql_date($_GET['date_start']) . "')\n" . " AND TO_DAYS(vm.voucher_date) <= TO_DAYS('" . my_sql_date($_GET['date_end']) . "')\n" . " AND vd.account_ref_id IN (SELECT coa.account_ref_id FROM chart_of_account coa WHERE coa.account_class = '{$accounts_class}' AND coa.company_ref_id = vm.company_ref_id)\n" . " AND vm.company_ref_id = {$_SESSION['company_id']}\n"; $result = $mysqli->query($sql); if ($row = $result->fetch_assoc()) { $runningBalance += $row['bal'] * 1; } $sdata[] = array('account_name' => $accounts_class, 'amount' => $runningBalance);
require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_party_age_start', $date_start); updateDate('rpt_party_age_end', $date_end); $accounts = array(); foreach ($_GET['account'] as $account) { if ($account == '#ALL#') { continue; } $accounts[] = $account; } if (count($accounts) == 0) { //all was selected require_once '../includes/db.php'; $items = oci_parse($conn, "SELECT coa.account_ref_id\n" . " FROM chart_of_account coa\n" . " INNER JOIN party p ON p.account_ref_id = coa.account_ref_id\n" . " WHERE p.party_city = '{$_GET['city']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name"); oci_execute($items); while ($row = oci_fetch_assoc($items)) { $accounts[] = $row['account_ref_id']; }
<?php include '../includes/db.php'; include_once '../includes/connecti.php'; /** @var $mysqli mysqli */ require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $conn = oci_connect($db_user, $db_pass, $db_host); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('purchase_return', $_POST['purchase_return_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if (substr($key, 0, 9) == "purchase_" && $key != "purchase_return_party" && $key != "purchase_return_notype" && $key != "purchase_return_id" && $key != "purchase_return_godown") { if ($key == "purchase_return_date") { $key = "pur_ret_date"; $val = my_sql_date($val); } if ($key == "purchase_return_party_hidden") { $key = "party_code"; } if ($key == "purchase_return_godown_hidden") {
<?php session_start(); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { updateDate('rpt_vouchers_start', $_GET['date_start']); updateDate('rpt_vouchers_end', $_GET['date_end']); $sql = "" . " SELECT vm.voucher_id, vm.seq,\n" . " DATE_FORMAT(vm.voucher_date, '%d-%m-%Y') voucher_date_fmt,\n" . " CASE\n" . " WHEN vm.voucher_type = 'CR' THEN 'Cash Recieve Voucher'\n" . " WHEN vm.voucher_type = 'CP' THEN 'Cash Payment Voucher'\n" . " WHEN vm.voucher_type = 'BV' THEN 'Bank Voucher'\n" . " WHEN vm.voucher_type = 'JV' THEN 'Journal Voucher'\n" . " ELSE (SELECT s.description FROM sys_codes s WHERE s.code = vm.voucher_type AND s.company_ref_id = vm.company_ref_id LIMIT 1)\n" . " END voucher_type,\n" . " vm.voucher_remarks,\n" . " CONCAT(u.user_first_name, ' ', u.user_last_name) voucher_by\n" . " FROM voucher_master vm\n" . " LEFT OUTER JOIN sys_users u ON u.user_id = vm.voucher_by\n" . " WHERE vm.company_ref_id = {$_SESSION['company_id']}\n" . " AND vm.voucher_type NOT IN ('SV', 'SR', 'PV', 'PR', 'CO', 'CJV', 'CBV')"; if (strlen($_GET['voucher_id']) > 0) { $input = $_GET['voucher_id']; $rangeCharacters = "0123456789, -"; $voucher_ids = array(); if (containsOnly($input, $rangeCharacters)) { $ranges = explode(",", $input); for ($j = 0; $j < count($ranges); $j++) { $range = trim($ranges[$j]); if (strlen($range) < 1) { continue; } $index = strpos($range, "-"); if ($index > 0) { $rangeInputs = explode("-", $range); if (count($rangeInputs) == 2) { $num1 = $rangeInputs[0] * 1; $num2 = $num3 = $rangeInputs[1] * 1; if ($num1 > $num2) { $num3 = $num1; $num1 = $num2; }
<?php session_start(); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { if (strlen($_GET['date_start']) > 0) { updateDate('rpt_order_invoice_start', $_GET['date_start']); } if (strlen($_GET['date_end']) > 0) { updateDate('rpt_order_invoice_end', $_GET['date_end']); } $title = $_title; $where = ""; if (strlen($_GET['date_start']) > 0) { $where .= " AND TO_DAYS(m.o_date) >= TO_DAYS('" . my_sql_date($_GET['date_start']) . "')\n"; } if (strlen($_GET['date_end']) > 0) { $where .= " AND TO_DAYS(m.o_date) <= TO_DAYS('" . my_sql_date($_GET['date_end']) . "')\n"; } if (strlen($_GET['order_id']) > 0) { $where .= " AND m.seq = {$_GET['order_id']}\n"; } if (isset($_GET['supplier']) && count($_GET['supplier']) > 0) { if (count($_GET['supplier']) == 1 && $_GET['supplier'][0] == "#ALL#") { //Select All was selected. } else { $where .= " AND m.party_code IN ('" . join("','", $_GET['supplier']) . "')\n"; } }
modifierOeuvre(); break; case 'modifierOeuvreSoumise': modifierOeuvreSoumise(); break; case 'modifierArtisteSoumis': modifierArtisteSoumis(); break; case 'modifierCommentaireSoumis': modifierCommentaireSoumis(); break; case 'updateOeuvresVille': updateOeuvresVille(); break; case 'updateDate': updateDate(); break; case 'recupererCategories': recupererCategories(); break; case 'recupererArrondissements': recupererArrondissements(); break; case 'recupererOeuvres': recupererOeuvres(); break; case 'recupererUneOeuvre': recupererUneOeuvre(); break; case 'recupererUnePhoto': recupererUnePhoto();
<?php @session_start(); require_once '../includes/connecti.php'; /** @var $mysqli mysqli */ require_once '../includes/funcs.inc.php'; /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report'])) { updateDate('rpt_sales_vendor_party_start', $_GET['date_start']); updateDate('rpt_sales_vendor_party_end', $_GET['date_end']); $title = $_title; $partyName = getIVal("party_name", "party", "party_code = {$_GET['party_hidden']}"); $sql = "" . "SELECT sm.seq, sm.billno, im.cno, concat(IFNULL(CONCAT(manufacturer_no, ' -- '), ''), description) as description,\n" . " sd.sales_qty, sd.sales_rate, im.circular_rate, im.fix_rate, (sd.sales_qty)*(sd.sales_rate-IFNULL(im.fix_rate,0)) diff\n" . " FROM sales_master sm\n" . " INNER JOIN sales_detail sd ON sd.sale_master_id = sm.sale_master_id\n" . " INNER JOIN item_master im ON im.i_code = sd.i_code\n" . " WHERE sm.party_code = {$_GET['party_hidden']}\n"; if (strlen($_GET['date_start']) > 0) { $sql .= " AND TO_DAYS(sm.sale_date) >= TO_DAYS('" . my_sql_date($_GET['date_start']) . "')\n"; } if (strlen($_GET['date_end']) > 0) { $sql .= " AND TO_DAYS(sm.sale_date) <= TO_DAYS('" . my_sql_date($_GET['date_end']) . "')\n"; } if (strlen($_GET['date_start']) + strlen($_GET['date_end']) < 1) { $d = date('Y') . "-01-01"; $sql .= " AND TO_DAYS(sm.sale_date) >= TO_DAYS('{$d}')\n"; } $result = $mysqli->query($sql); $data = array(); $tdata = array('title' => 'Total', 'rate' => (double) 0); while ($row = $result->fetch_assoc()) { $row['sales_qty'] = $row['sales_qty'] * 1; $row['sales_rate'] = $row['sales_rate'] * 1; $row['circular_rate'] = $row['circular_rate'] * 1;
<?php include '../includes/connect.php'; include_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('order', $_POST['order_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if ($key == "order_date" || $key == "order_supplier_hidden" || $key == "order_remarks" || $key == "order_reference") { if ($key == "order_date") { $key = "o_date"; $val = my_sql_date($val); } if ($key == "order_supplier_hidden") { $key = "party_code"; } if ($key == "order_remarks") { $key = "remarks"; }
<?php include '../includes/connect.php'; include_once '../includes/connecti.php'; /** @var $mysqli mysqli */ require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('sales', $_POST['sales_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $year_start_date = getValue("start_date", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; $sale_date = ""; $sale_party = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if ($key == "sales_date" || $key == "sales_remarks" || $key == "sales_party_hidden" || $key == "sales_godown_hidden" || $key == "sales_billno" || $key == "sales_packing" || $key == "sales_type" || $key == "sales_transporter" || $key == "sales_billteno" || $key == "sales_person" || $key == "sales_by") { if ($key == "sales_date") { $key = "sale_date"; //Add following check by Khurram Naseem to avoid stock report bug, if date is financial year start date add one day. if (my_sql_date($val) == $year_start_date) { $val = my_sql_date($val); //dump($year_start_date);
require_once '../includes/connecti.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report'])) { $date_start = ""; if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) { $date_start = $_GET['date_start']; } $date_end = ""; if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) { $date_end = $_GET['date_end']; } updateDate('rpt_party_outstanding_start', $date_start); updateDate('rpt_party_outstanding_end', $date_end); $accounts = array(); if (count($accounts) == 0) { //all was selected require_once '../includes/db.php'; $where = ""; $order = ""; if (isset($_GET['region']) && strlen($_GET['region']) > 0) { $where = "p.party_city IN (SELECT city FROM vu_city_region WHERE region = '{$_GET['region']}')\n"; $order = "p.party_city, coa.account_name"; } else { if (isset($_GET['city']) && strlen($_GET['city']) > 0) { $where = "p.party_city = '{$_GET['city']}'\n"; $order = "coa.account_name"; } }
<?php include '../includes/connect.php'; include_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('voucher', $_POST['voucher_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if ($key == "voucher_date" || $key == "voucher_remarks" || $key == "voucher_type" || $key == "voucher_cheque") { if ($key == 'voucher_date') { $val = my_sql_date($val); } $first_colval = $first_colval . $seprator . $key . " = '" . $val . "'"; $seprator = ','; } else { if ($key == "voucher_id") { $last_part = " WHERE voucher_id = " . $val; } } }
<?php include '../includes/connect.php'; include_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; include '../includes/JSON.php'; session_start(); $selected_company_id = $_SESSION['company_id']; ob_start(); dump($_POST); $data = array(); updateDate('godown_transfer', $_POST['godown_transfer_date']); $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true); $first_colval = ""; $seprator = ""; $last_part = ""; $first_part = ""; $first_tab_ins = ""; foreach ($_POST as $key => $val) { if (strlen($val) > 0) { if (substr($key, 0, 16) == "godown_transfer_" && $key != "godown_transfer_from" && $key != "godown_transfer_to" && $key != "godown_transfer_id") { if ($key == "godown_transfer_date") { $key = "trans_date"; $val = my_sql_date($val); } if ($key == "godown_transfer_from_hidden") { $key = "from_godown"; } if ($key == "godown_transfer_to_hidden") { $key = "to_godown"; }
<?php @session_start(); require_once '../includes/connecti.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ require_once '../includes/funcs.inc.php'; $_title = getReportTitle(); if (isset($_GET['report']) && $_GET['report'] == 'true') { updateDate('rpt_purchase_return_start', $_GET['date_start']); updateDate('rpt_purchase_return_end', $_GET['date_end']); require_once '../includes/PDFReport.class.php'; class PDF extends PDFReport { function printHeader() { global $date, $billNo, $partyName; $this->SetFont('Arial', 'B', 8); $col1 = 30; $col2 = 50; $col3 = 30; $col4 = 50; $xspace = 80 - $col2; $pdata = array("Date", $date, "Bill #", $billNo, "Vendor", $partyName, "", ""); for ($i = 0; $i < count($pdata); $i += 4) { $border = "0"; if (strlen($pdata[$i + 0]) > 0) { $border = 'B'; } $this->Cell($col1, 6, $pdata[$i + 0], 0, 0, 'L'); $this->Cell($col2, 6, $pdata[$i + 1], $border, 0, 'L');
<?php @session_start(); require_once '../includes/connect.php'; require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report'])) { if (strlen($_GET['date1']) > 0) { updateDate('rpt_godown_transfer_start', $_GET['date1']); } if (strlen($_GET['date2']) > 0) { updateDate('rpt_godown_transfer_end', $_GET['date2']); } $title = "{$_title}"; $gfrom = ""; $gto = ""; $where = ""; $year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$_SESSION['company_id']} AND is_active = 'Yes'"); if (isset($_GET['invoice']) && strlen($_GET['invoice']) > 0) { $gfrom = getValue("g.g_name", "godown g INNER JOIN godown_trans_master m ON m.from_godown = g.g_code", "m.tr_id = {$_GET['invoice']}"); $gto = getValue("g.g_name", "godown g INNER JOIN godown_trans_master m ON m.to_godown = g.g_code", "m.tr_id = {$_GET['invoice']}"); $where = " AND m.tr_id = {$_GET['invoice']}\n"; } else { $gfrom = getValue("g_name", "godown", "g_code = {$_GET['gfrom']}"); $gto = getValue("g_name", "godown", "g_code = {$_GET['gto']}"); $where = " AND m.from_godown = {$_GET['gfrom']}\n AND m.to_godown = {$_GET['gto']}\n"; } if (strlen($_GET['date1']) > 0) {
$html = '<h3>Semester Start Date <div id="sems_date" > <input type="text" name="s_date" id="s_date" value="' . $semStartDate . '" /></div> Semester End Date <div id="seme_date"> <input type="text" name="s_date" id="s_date" value="' . $semEndDate . '" /></div></h3>'; $html = $html . '<input type="button" name="change" id="update" value="update" onclick="updateDate(' . $dept_id . ');" />'; echo $html; } function updateDate($dDB, $s_date, $e_date, $dept_id) { $re1 = $dDB->setsemStartDate($dept_id, $s_date); $re2 = $dDB->setsemEndDate($dept_id, $e_date); $html = ""; $html = $html . '<h3>Semester Start Date <div id="sems_date" >' . $s_date . '</div> Semester End Date <div id="seme_date">' . $e_date . '</div></h3> <input type="button" name="change" id="change"value="change" onclick="editDate(' . $dept_id . ');" />'; echo $html; } require_once '../DB/initDB.php'; require_once '../DB/leaveDB.php'; require_once '../DB/userDB.php'; require_once '../DB/departmentDB.php'; require_once '../checkid.php'; $lDB = new leaveDB(); $uDB = new userDB(); $dDB = new departmentDB(); $param = mysql_escape_string(trim($_POST['param'])); if ($param == editDate) { $dept_id = mysql_escape_string(trim($_POST['dept_id'])); editDate($lDB, $uDB, $dDB, $dept_id); } elseif ($param == updateDate) { $dept_id = mysql_escape_string(trim($_POST['dept_id'])); $s_date = mysql_escape_string(trim($_POST['s_date'])); $e_date = mysql_escape_string(trim($_POST['e_date'])); updateDate($dDB, $s_date, $e_date, $dept_id); }
<?php session_start(); $conn = oci_connect($db_user, $db_pass, $db_host); require_once '../includes/connecti.php'; require_once '../includes/funcs.inc.php'; /** @var $mysqli mysqli */ /** @var $result mysqli_result */ $_title = getReportTitle(); if (isset($_GET['report']) && $_GET['report'] == 'true') { updateDate('rpt_delivery_challan_start', $_GET['date_start']); updateDate('rpt_delivery_challan_end', $_GET['date_end']); require_once '../includes/PDFReport.class.php'; require_once '../includes/fpdf.rotate.php'; class PDF extends PDFReport { function printHeader() { global $invoice, $partyName, $date, $billno; $this->SetFillColor(255, 255, 255); $cols = array(15, 55, 15, 10, 15, 15, 15, 20); $xspace = 10; $pdata = array("Customer", $partyName, "Order#", $invoice, "Challan#", $billno, "Date", $date); for ($i = 0; $i < count($pdata); $i += 8) { for ($j = 0; $j <= 6; $j += 2) { if ($j > 0) { $this->SetX($this->GetX() + $xspace); } $border = "0"; if (strlen($pdata[$i + $j]) > 0) { $border = 'B';