当前位置: 首页>>代码示例>>PHP>>正文


PHP getCSetting函数代码示例

本文整理汇总了PHP中getCSetting函数的典型用法代码示例。如果您正苦于以下问题:PHP getCSetting函数的具体用法?PHP getCSetting怎么用?PHP getCSetting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getCSetting函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create_dummy

function create_dummy($deptid, $cusnum)
{
    # Get selected customer info
    db_connect();
    $sql = "SELECT * FROM customers WHERE cusnum = '{$cusnum}' AND div = '" . USER_DIV . "'";
    $custRslt = db_exec($sql) or errDie("Unable to get customer information");
    $cust = pg_fetch_array($custRslt);
    $curr = getSymbol($cust['fcid']);
    $xrate = getRate($cust['fcid']);
    $trans_date_setting = getCSetting("USE_TRANSACTION_DATE");
    if (isset($trans_date_setting) and $trans_date_setting == "yes") {
        $trans_date_value = getCSetting("TRANSACTION_DATE");
        $date_arr = explode("-", $trans_date_value);
        $date_year = $date_arr[0];
        $date_month = $date_arr[1];
        $date_day = $date_arr[2];
    } else {
        $date_year = date("Y");
        $date_month = date("m");
        $date_day = date("d");
    }
    $odate = "{$date_year}-{$date_month}-{$date_day}";
    db_connect();
    # Insert purchase to DB
    $sql = "\n\t\tINSERT INTO nons_invoices (\n\t\t\tcusname, cusaddr, cusvatno, chrgvat, fcid, currency, \n\t\t\txrate, odate, sdate, subtot, balance, vat, total, done, username, prd, invnum, typ, ctyp, \n\t\t\ttval, location, div\n\t\t) VALUES (\n\t\t\t'{$cust['cusname']} {$cust['surname']}', '{$cust['addr1']}', '{$cust['vatnum']}', 'yes', '{$cust['fcid']}', '{$curr['symbol']}', \n\t\t\t'{$xrate}', '{$odate}', CURRENT_DATE, 0, 0, 0, 0, 'n', '" . USER_NAME . "', '" . PRD_DB . "', 0, 'inv', 's', \n\t\t\t'{$cusnum}', 'int', '" . USER_DIV . "'\n\t\t)";
    $rslt = db_exec($sql) or errDie("Unable to create template Non-Stock Invoice.", SELF);
    # Get next ordnum
    $invid = lastinvid();
    return $invid;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:30,代码来源:nons-intinvoice-new.php

示例2: edit

function edit(&$frm)
{
    /* @var $frm cForm */
    $frm->setkey("confirm");
    $frm->settitle("Point of Sale Settings");
    $frm->add_heading("Point of Sale Slips/Printing");
    /* point of sale message at the bottom of the slip */
    $posmsg = getCSetting("POSMSG");
    $frm->add_textarea("Message to Display at bottom of Slip", "posmsg", $posmsg, "1:255");
    return $frm->getfrm_input();
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:11,代码来源:pos-options.php

示例3: edit

function edit(&$frm)
{
    /* @var $frm cForm */
    $frm->setkey("write");
    $frm->settitle("Printing Options");
    $frm->add_heading("Details");
    $yn = array("y" => "Yes", "n" => "No");
    $print_dialog = getCSetting("PRINT_DIALOG");
    $frm->add_select("Automatically Display Print Dialog", "print_dialog", $print_dialog, $yn, "string", "1:1");
    $frm->add_ctrlbtn("Save", "submit", "btn_submit");
    return $frm->getfrm_input();
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:12,代码来源:printing.php

示例4: edit

function edit(&$frm)
{
    /* @var $frm cForm */
    $frm->setkey("write");
    $frm->settitle("Purchase Default VAT Setting");
    $frm->add_heading("Setting");
    $yn = array("yes" => "VAT Inclusive", "no" => "VAT Exclusive");
    $vat_setting = getCSetting("PURCH_DEFAULT_VAT_SETTING");
    $frm->add_select("Default Stock Purchase VAT Setting", "vat_setting", $vat_setting, $yn, "string", "2:3");
    $frm->add_ctrlbtn("Save", "submit", "btn_submit");
    return $frm->getfrm_input();
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:12,代码来源:purchase-default-vat-setting.php

示例5: do_setting

function do_setting()
{
    extract($_GET);
    $inv_set = getCSetting("NEWINV_SETTING");
    if (isset($vol) && $vol == "yes") {
        $script = "calc-cust-credit-stockinv.php";
    } else {
        $script = "cust-credit-stockinv.php";
    }
    if ($inv_set == "no") {
        return mkQuickLinks(ql("../{$script}", "Make Another Invoice"), ql("cust-credit-stockinv-newsetting.php?change=yes", "Change Setting To Create A New Invoice After Processing One."), ql("../invoice-view.php", "View Invoices"));
    } else {
        header("Location: ../{$script}");
    }
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:15,代码来源:cust-credit-stockinv-newsetting.php

示例6: change_settings

function change_settings($_POST)
{
    extract($_POST);
    $traddisc_check = getCSetting("SET_INV_TRADDISC");
    db_connect();
    if (!isset($traddisc_check) or strlen($traddisc_check) < 1) {
        #setting does not yet exist ... ad it :/
        $add_sql = "INSERT INTO cubit.settings (constant,label,value,type,datatype,minlen,maxlen,div,readonly) VALUES ('SET_INV_TRADDISC','Include/Exclude  Delivery Charge In Trade Discount','exclude','general','string','7','7','0','f');";
        $run_add = db_exec($add_sql) or errDie("Unable to get settings information.");
    } else {
        #update the setting ...
        $upd_sql = "UPDATE settings SET value = '{$traddisc}' WHERE constant = 'SET_INV_TRADDISC'";
        $run_upd = db_exec($upd_sql) or errDie("Unable to update setting information.");
    }
    return show_settings("<li class='err'>Settings Have Been Saved.</li><br>");
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:16,代码来源:change_settings.php

示例7: save_setting_val

function save_setting_val($_POST)
{
    extract($_POST);
    db_connect();
    #check for setting
    $check = getCSetting("JOBCARD_OPERATION_STOCK_CHECKBOX");
    if (!isset($check) or strlen($check) < 1) {
        #no setting ... insert
        $sql = "\n\t\t\tINSERT INTO cubit.settings (\n\t\t\t\tconstant, label, value, type, datatype, minlen, maxlen, div, readonly\n\t\t\t) VALUES (\n\t\t\t\t'JOBCARD_OPERATION_STOCK_CHECKBOX', 'Jobcard Operation Add Stock Checkbox Default Setting', '{$operation_setting}', 'general', 'allstring', '6', '14', '0', 'f'\n\t\t\t)";
        $run_sql = db_exec($sql) or errDie("Unable to record setting information.");
    } else {
        $upd_sql = "UPDATE settings SET value = '{$operation_setting}' WHERE constant = 'JOBCARD_OPERATION_STOCK_CHECKBOX'";
        $run_upd = db_exec($upd_sql) or errDie("Unable to update customer statement setting.");
    }
    return get_setting_val("<li class='err'>Jobcard Operation Add Stock Setting Updated.</li><br>");
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:16,代码来源:jobcard-operation-stock-setting.php

示例8: save_setting_val

function save_setting_val($_POST)
{
    extract($_POST);
    db_connect();
    #check for setting
    $check = getCSetting("STATEMENT_AGE");
    if (!isset($check) or strlen($check) < 1) {
        #no setting ... insert
        $sql = "\n\t\t\t\tINSERT INTO cubit.settings \n\t\t\t\t\t(constant,label,value,type,datatype,minlen,maxlen,div,readonly) \n\t\t\t\tVALUES \n\t\t\t\t\t('STATEMENT_AGE','Customer Statement','{$state_setting}','general','allstring','6','9','0','f')";
        $run_sql = db_exec($sql) or errDie("Unable to record setting information.");
    } else {
        $upd_sql = "UPDATE settings SET value = '{$state_setting}' WHERE constant = 'STATEMENT_AGE'";
        $run_upd = db_exec($upd_sql) or errDie("Unable to update customer statement setting.");
    }
    return get_setting_val("<li class='err'>Customer Statement Setting Updated.</li><br>");
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:16,代码来源:customer-statement-setting.php

示例9: show_receipt

function show_receipt($_GET)
{
    extract($_GET);
    if (!isset($recid) or strlen($recid) < 1) {
        return "<li class='err'>Invalid use of module. Invalid Receipt ID.</li>";
    }
    db_connect();
    $get_rec = "SELECT * FROM cashbook WHERE cashid = '{$recid}' LIMIT 1";
    $run_rec = db_exec($get_rec) or errDie("Unable to get receipt information.");
    if (pg_numrows($run_rec) < 1) {
        return "<li class='err'>Receipt information not found.</li>";
    } else {
        $cash_arr = pg_fetch_array($run_rec);
        #get customer information
        $get_cust = "SELECT accno,surname,paddr1 FROM customers WHERE cusnum = '{$cash_arr['cusnum']}' LIMIT 1";
        $run_cust = db_exec($get_cust) or errDie("Unable to get customer information.");
        if (pg_numrows($run_cust) < 1) {
            $cus_addr = "";
            $cus_accno = "";
        } else {
            $cus_arr = pg_fetch_array($run_cust);
            $cus_addr = $cus_arr['paddr1'];
            $cus_accno = $cus_arr['accno'];
        }
        $inv_ids = explode("|", $cash_arr['rinvids']);
        $inv_amts = explode("|", $cash_arr['amounts']);
        $null1 = array_shift($inv_ids);
        $null2 = array_shift($inv_amts);
        $listing = "";
        $total = 0;
        foreach ($inv_ids as $key => $each) {
            $listing .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{$cash_arr['date']}</td>\n\t\t\t\t\t<td>{$cash_arr['reference']}</td>\n\t\t\t\t\t<td>" . CUR . " " . sprint($inv_amts[$key]) . "</td>\n\t\t\t\t</tr>";
            $total = $total + $inv_amts[$key];
        }
        $unalloc = $cash_arr['amount'] - $total;
        if ($unalloc > 0) {
            $listing .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{$cash_arr['date']}</td>\n\t\t\t\t\t<td>{$cash_arr['reference']} (Unallocated)</td>\n\t\t\t\t\t<td>" . CUR . " " . sprint($unalloc) . "</td>\n\t\t\t\t</tr>";
            $total += $unalloc;
        }
        $listing .= "\n\t\t\t<tr>\n\t\t\t\t<td colspan='2' align='right'><b>Total:</b></td>\n\t\t\t\t<td>" . CUR . " " . sprint($total) . "</td>\n\t\t\t</tr>";
        $receiptnumber = $cash_arr['cashid'];
    }
    $comments = getCSetting("DEFAULT_BANK_RECPT_COMMENTS");
    $rborder = "style='border-right: 2px solid #000'";
    $display = "\n\t\t<style>\n\t\t\ttable { border: 2px solid #000 }\n\t\t</style>\n\t\t<table border='0' cellpadding='2' cellspacing='2' width='80%' align='center'>\n\t\t\t<tr>\n\t\t\t\t<td width='30%'></td>\n\t\t\t\t<td align='center'><font size='5'><b>" . COMP_NAME . "</b></font></td>\n\t\t\t\t<td align='right'><font size='4'><b>Customer Receipt</b></font></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<p>\n\t\t<table cellpadding='1' cellspacing='0' width='80%' align='center'>\n\t\t\t<tr>\n\t\t\t\t<td {$rborder}>\n\t\t\t\t\t<b>" . COMP_NAME . "</b><br>\n\t\t\t\t\t" . COMP_ADDRESS . "<br>\n\t\t\t\t\t" . COMP_PADDR . "\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<b>Received From:</b><br>\n\t\t\t\t\t{$cash_arr['name']}<br>\n\t\t\t\t\t{$cus_addr}<br>\n\t\t\t\t\t<br>\n\t\t\t\t\t<b>Account Number:</b> {$cus_accno}<br>\n\t\t\t\t\t<b>Receipt Number:</b> {$receiptnumber}\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<p>\n\t\t<table " . TMPL_tblDflts . " width='80%' align='center'>\n\t\t\t<tr>\n\t\t\t\t<td><b>Date</b></td>\n\t\t\t\t<td><b>Ref Num</b></td>\n\t\t\t\t<td><b>Amount</b></td>\n\t\t\t</tr>\n\t\t\t{$listing}\n\t\t\t" . TBL_BR . "\n\t\t\t" . TBL_BR . "\n\t\t</table>\n\t\t<p>\n\t\t<table " . TMPL_tblDflts . " width='80%' align='center'>\n\t\t\t" . TBL_BR . "\n\t\t\t<tr>\n\t\t\t\t<td width='60%'>" . nl2br(base64_decode($comments)) . "</td>\n\t\t\t\t<td align='right'>_____________________________________</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td align='center'>Signature</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<div style='position:absolute;left:11%'>\n\t\t<font size='1'>&#169 Cubit Accounting Software</font>\n\t\t</div>";
    return $display;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:47,代码来源:bank-recpt-inv-print.php

示例10: get_current_setting

function get_current_setting()
{
    db_connect();
    $sort_order_setting = getCSetting("ACCOUNT_SORT_ORDER");
    if (!isset($sort_order_setting) or strlen($sort_order_setting) < 1) {
        $sort_order_setting = "number";
    }
    if ($sort_order_setting == "number") {
        $checked1 = "checked='yes'";
        $checked2 = "";
    } else {
        $checked1 = "";
        $checked2 = "checked='yes'";
    }
    $display = "\n\t\t<h2>Accounts Selected Sort Order</h2>\n\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t<input type='hidden' name='key' value='confirm'>\n\t\t<table " . TMPL_tblDflts . ">\n\t\t\t<tr>\n\t\t\t\t<th>Accounts Sort Order</th>\n\t\t\t</tr>\n\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t<td>\n\t\t\t\t\t<input type='radio' name='sort_order' value='number' {$checked1}> Account Number - Account Name \n\t\t\t\t\t<input type='radio' name='sort_order' value='name' {$checked2}> Account Name - Account Number \n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr><td><br></td></tr>\n\t\t\t<tr>\n\t\t\t\t<td align='right'><input type='submit' value='Save Setting'></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</form>";
    return $display;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:17,代码来源:accounts-drop.php

示例11: select

function select($frm)
{
    extract($_REQUEST);
    if (!isset($emp_year)) {
        $emp_year = getCSetting("EMP_TAXYEAR");
    }
    /* @var $frm cForm */
    $frm->setkey("confirm");
    $frm->settitle("Select Active Employee Tax Year");
    $frm->setmsg("The employee's tax year will end on 28 February of the year you select below.<br />\n\t\t<li class='err'>Also note that, no matter which year is chosen below, the 2006/2007 PAYE\n\t\t\ttax tables will be used until current tax legislation is changed..</li>");
    $yrs = array();
    for ($i = 1990; $i < 2028; ++$i) {
        $yrs[$i] = $i;
    }
    $frm->add_heading("Select");
    $frm->add_select("Tax Year", "emp_year", $emp_year, $yrs, "num", "4:4");
    return $frm->getfrm_input();
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:18,代码来源:empyear.php

示例12: confirm_info_setting

function confirm_info_setting($_POST)
{
    extract($_POST);
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($pay_type, "string", 1, 15, "Invalid Payment Method");
    $v->isOk($process_type, "string", 1, 15, "Invalid Payment Process Method");
    # display errors, if any
    if ($v->isError()) {
        $confirmCust = "";
        $errors = $v->getErrors();
        foreach ($errors as $e) {
            $confirmCust .= "<li class='err'>" . $e["msg"] . "</li>";
        }
        return $confirmCust;
    }
    db_connect();
    pglib_transaction("BEGIN") or errDie("Unable to start transaction.");
    $check = getCSetting("SUPP_PAY_TYPE");
    if (!isset($check) or strlen($check) < 1) {
        #no setting ... insert
        $ins_sql = "INSERT INTO settings (constant,label,value,type,datatype,minlen,maxlen,div,readonly) VALUES ('SUPP_PAY_TYPE','Supplier Payment Type','{$pay_type}','general','allstring','1','20','0','f')";
        $run_ins = db_exec($ins_sql) or errDie("Unable to record supplier payment setting.");
    } else {
        #settings ... update
        $upd_sql = "UPDATE settings SET value = '{$pay_type}' WHERE constant = 'SUPP_PAY_TYPE'";
        $run_upd = db_exec($upd_sql) or errDie("Unable to update supplier pay type setting.");
    }
    $check2 = getCSetting("SUPP_PROCESS_TYPE");
    if (!isset($check2) or strlen($check2) < 1) {
        #no setting ... insert
        $ins_sql = "INSERT INTO settings (constant,label,value,type,datatype,minlen,maxlen,div,readonly) VALUES ('SUPP_PROCESS_TYPE','Supplier Payment Process Type','{$process_type}','general','allstring','1','20','0','f')";
        $run_ins = db_exec($ins_sql) or errDie("Unable to record supplier payment setting.");
    } else {
        #settings ... update
        $upd_sql = "UPDATE settings SET value = '{$process_type}' WHERE constant = 'SUPP_PROCESS_TYPE'";
        $run_upd = db_exec($upd_sql) or errDie("Unable to update supplier pay type setting.");
    }
    pglib_transaction("COMMIT") or errDie("Unable to complete transaction.");
    return get_info_setting($_POST, "<li class='err'>Supplier Settings Updated</li><br>");
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:42,代码来源:supp-payment-type.php

示例13: write_setting

function write_setting($_POST)
{
    extract($_POST);
    if (!isset($setting) or strlen($setting) < 1) {
        $setting = "";
    }
    db_connect();
    #update setting
    $check = getCSetting("MARKET_MAIL_FROM");
    if (!isset($check) or strlen($check) < 1) {
        #no setting ... insert
        $ins_sql = "\n\t\t\tINSERT INTO settings (\n\t\t\t\tconstant, label, value, type, \n\t\t\t\tdatatype, minlen, maxlen, div, readonly\n\t\t\t) VALUES (\n\t\t\t\t'MARKET_MAIL_FROM', 'Marketing Email From Address', '{$setting}', 'general',\n\t\t\t\t'allstring', '1', '250', '0', 'f'\n\t\t\t);\n\t\t\t\t";
        $run_ins = db_exec($ins_sql) or errDie("Unable to remove marketing from email information.");
    } else {
        #setting ... update
        $upd_sql = "UPDATE settings SET value = '{$setting}' WHERE constant = 'MARKET_MAIL_FROM'";
        $run_upd = db_exec($upd_sql) or errDie("Unable to update marketing email information.");
    }
    return get_show_setting("<li class='err'>Email Setting Updated</li>");
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:20,代码来源:email-market-address.php

示例14: editSettings

function editSettings()
{
    # connect to db
    db_connect();
    /* static settings for dumb sars thing... you might as well just make your percentage 0 */
    $i = 0;
    if (!isset($sdlpayable)) {
        $sdlpayable = getCSetting("SDLPAYABLE");
    }
    if (!isset($emploan_int)) {
        $emploan_int = getCSetting("EMPLOAN_INT");
    }
    $settings = "";
    $settings .= "\n\t<script>\n\thelp_msgs = new Array();\n\n\thelp_msgs[0] =\n\t\t 'When the total annual salaries being paid out by your company is less than '\n\t\t+'R500 000, SARS will notify your company that no SDL needs to be paid. In the event '\n\t\t+'this amount does go above R500 000, you will again be notified otherwise.';\n\n\thelp_msgs[1] =\n\t\t 'This value is used as the default interest to be used when granting a loan to '\n\t\t+'an employee. At the time of granting, it is possible to change it again if '\n\t\t+'needed. Note that this is not and does not change the Official interest rate of 8%. '\n\t\t+'If the interest you charge on the loan is less than the official rate, '\n\t\t+'a fringe benefit equal to the difference of the interest you charged and '\n\t\t+'the possible interest at the official rate will be added to the employee\\'s '\n\t\t+'taxable income for PAYE calculation purposes.';\n\n\tfunction showhelp(obj, item) {\n\t\tXPopupShow(help_msgs[item], obj);\n\t}\n\t</script>\n\t<tr class='" . bg_class() . "'>\n\t\t<!--<td><a href='#top'>Top</a> | <a href='#bottom'>Bottom</a></td>//-->\n\t\t<td align='center'>SDL Payable [<a href='#' onClick='javascript:showhelp(this, 0);'>about</a>]</td>\n\t\t<td>\n\t\t\t<select name='sdlpayable'>\n\t\t\t\t<option value='y' " . ($sdlpayable != 'n' ? "selected" : "") . ">Yes</option>\n\t\t\t\t<option value='n' " . ($sdlpayable == 'n' ? "selected" : "") . ">No</option>\n\t\t\t</select>\n\t\t</td>\n\t</tr>\n\t<tr class='" . bg_class() . "'>\n\t\t<!--<td><a href='#top'>Top</a> | <a href='#bottom'>Bottom</a></td>//-->\n\t\t<td align='center'>Default Interest on Employee Loans [<a href='#' onClick='javascript:showhelp(this, 1);'>about</a>]</td>\n\t\t<td>\n\t\t\t<input type='text' name='emploan_int' value='{$emploan_int}'>\n\t\t</td>\n\t</tr>";
    # select editable settings from db
    $menu = "";
    $sql = "SELECT * FROM settings WHERE type='accounting' AND (readonly='f'::bool) ORDER BY label";
    $setRslt = db_exec($sql) or errDie("Unable to select settings from database.");
    $num_settings = pg_numrows($setRslt);
    if ($num_settings < 1) {
        errDie("No settings found in database!");
    }
    while ($mySet = pg_fetch_array($setRslt)) {
        //$menu .= (($i+1) % 4) ? "<a href='#$mySet[constant]' class=nav>$mySet[label]</a> | " : "<a href='#$mySet[constant]' class=nav>$mySet[label]</a><p>\n";
        $settings .= "\n\t\t<tr class='" . bg_class() . "'>\n\t\t\t<!--<td><a href='#top'>Top</a> | <a href='#bottom'>Bottom</a></td>//-->\n\t\t\t<td align=center><a name='{$mySet['constant']}'></a>{$mySet['label']}</td>\n\t\t\t<td><input type=text size=20 name='{$mySet['constant']}' value='{$mySet['value']}'></td>\n\t\t</tr>\n";
        $i++;
    }
    $Sl = "SELECT * FROM salset";
    $Ri = db_exec($Sl);
    if (pg_num_rows($Ri) > 0) {
        $set = "selected";
        $set2 = "";
    } else {
        $set = "";
        $set2 = "selected";
    }
    $sets = "<select name='set'>\n\t<option value='Yes' {$set}>Yes</option>\n\t<option value='No' {$set2}>No</option>\n\t</select>";
    # Set up table & form
    $enterSettings = "<h3>Edit accounting settings</h3>\n<a name=top></a>\n{$menu}\n<p>\n<table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n<form action='" . SELF . "' method=post>\n<input type=hidden name=key value=confirm>\n<tr><th>Description</th><th>Value</th></tr>\n{$settings}\n<tr><td colspan=3 align=right><input type=submit value='Confirm &raquo;'></td></tr>\n</form>\n</table>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees")) . "\n<a name=bottom></a>\n";
    return $enterSettings;
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:41,代码来源:settings-acc-edit.php

示例15: create_dummy

function create_dummy($deptid)
{
    $trans_date_setting = getCSetting("USE_TRANSACTION_DATE");
    if (isset($trans_date_setting) and $trans_date_setting == "yes") {
        $trans_date_value = getCSetting("TRANSACTION_DATE");
        $date_arr = explode("-", $trans_date_value);
        $date_year = $date_arr[0];
        $date_month = $date_arr[1];
        $date_day = $date_arr[2];
    } else {
        $date_year = date("Y");
        $date_month = date("m");
        $date_day = date("d");
    }
    $odate = "{$date_year}-{$date_month}-{$date_day}";
    db_connect();
    # Insert purchase to DB
    $sql = "\n\t\tINSERT INTO nons_invoices (\n\t\t\tcusname, cusaddr, cusvatno, chrgvat, sdate, odate, subtot, balance, vat, total, done, username, prd, invnum, \n\t\t\ttyp, div, multiline \n\t\t) VALUES (\n\t\t\t'', '', '', 'yes', CURRENT_DATE, '{$odate}', 0, 0, 0, 0, 'n', '" . USER_NAME . "', '" . PRD_DB . "', 0, \n\t\t\t'quo', '" . USER_DIV . "', 'yes'\n\t\t)";
    $rslt = db_exec($sql) or errDie("Unable to create template Non-Stock Quote.", SELF);
    return lastinvid();
}
开发者ID:andrecoetzee,项目名称:accounting-123.com,代码行数:21,代码来源:nons-multiline-quote-new.php


注:本文中的getCSetting函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。