Example #1
0
	jsEnd();

	$default = "line_items";

	$escaped = htmlsafe($defaults[line_items]);
	$value = <<<EOD
<input type="text" size="25" name="value" value="$escaped">
EOD;
	$description = "{$LANG['default_number_items']}";

}
else if ($_GET["submit"] == "rows_per_page") {

	jsBegin();
	jsFormValidationBegin("frmpost");
	jsValidateifNum("def_num_rows_per_page","Define number of rows per page");
	jsFormValidationEnd();
	jsEnd();

	$default = "rows_per_page";

	$escaped = htmlsafe($defaults[rows_per_page]);
	$value = <<<EOD
<input type="text" size="25" name="value" value="$escaped">
EOD;
	$description = "{$LANG['default_rows_per_page']}";

}
else if ($_GET["submit"] == "def_inv_template") {

	$default = "template";
/*
* Script: consulting.php
* 	consulting invoice page
*
* Authors:
*	 Justin Kelly, Nicolas Ruflin
*
* Last edited:
* 	 2007-07-19
*
* License:
*	 GPL v2 or above
*
* Website:
* 	http://www.simpleinvoices.org
*/
//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
jsBegin();
jsFormValidationBegin("frmpost");
jsTextValidation("biller_id", "Biller Name", 1, 1000000);
jsTextValidation("customer_id", "Customer Name", 1, 1000000);
jsValidateifNumZero("i_quantity0", "Quantity");
jsValidateifNum("i_quantity0", "Quantity");
jsValidateRequired("select_products0", "Product");
jsTextValidation("select_tax", "Tax Rate", 1, 100);
jsPreferenceValidation("select_preferences", "Invoice Preference", 1, 1000000);
jsFormValidationEnd();
jsEnd();
$pageActive = "invoices";
include './modules/invoices/invoice.php';
Example #3
0
<?php

//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
$maxInvoice = maxInvoice();
jsBegin();
jsFormValidationBegin("frmpost");
#jsValidateifNum("ac_inv_id",$LANG['invoice_id']);
#jsPaymentValidation("ac_inv_id",$LANG['invoice_id'],1,$maxInvoice['maxId']);
jsValidateifNum("ac_amount", $LANG['amount']);
jsValidateifNum("ac_date", $LANG['date']);
jsFormValidationEnd();
jsEnd();
/* end validataion code */
$today = date("Y-m-d");
$master_invoice_id = $_GET['id'];
$invoice = null;
if (isset($_GET['id'])) {
    $invoiceobj = new invoice();
    $invoice = $invoiceobj->select($master_invoice_id);
} else {
    $sql = "SELECT * FROM " . TB_PREFIX . "invoices WHERE domain_id = :domain_id";
    /*
    	$sql = "SELECT iv.* FROM ".TB_PREFIX."invoices iv 
    				LEFT JOIN ".TB_PREFIX."preferences pr 
    					ON (pr.pref_id = iv.preference_id AND pr.domain_id = iv.domain_id)
    			WHERE pr.status = '1'";
    */
    $sth = dbQuery($sql, ':domain_id', domain_id::get());
    $invoice = $sth->fetch();
    #$sth = new invoice();
Example #4
0
<?php

//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
#table
jsBegin();
jsFormValidationBegin("frmpost");
jsValidateRequired("tax_description", $LANG['tax_description']);
jsValidateifNum("tax_percentage", $LANG['tax_percentage']);
jsFormValidationEnd();
jsEnd();
#get the invoice id
$tax_rate_id = $_GET['id'];
$tax = getTaxRate($tax_rate_id);
$types = getTaxTypes();
$smarty->assign("tax", $tax);
$smarty->assign("types", $types);
$smarty->assign('pageActive', 'tax_rate');
$subPageActive = $_GET['action'] == "view" ? "tax_rates_view" : "tax_rates_edit";
$smarty->assign('subPageActive', $subPageActive);
$smarty->assign('active_tab', '#setting');
Example #5
0
<?php

//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
#system defaults query
$defaults = getSystemDefaults();
if ($_GET["submit"] == "line_items") {
    jsBegin();
    jsFormValidationBegin("frmpost");
    jsValidateifNum("def_num_line_items", "Default number of line items");
    jsFormValidationEnd();
    jsEnd();
    $default = "line_items";
    $escaped = htmlsafe($defaults[line_items]);
    $value = <<<EOD
<input type="text" size="25" name="value" value="{$escaped}">
EOD;
    $description = "{$LANG['default_number_items']}";
} else {
    if ($_GET["submit"] == "def_inv_template") {
        $default = "template";
        /*drop down list code for invoice template - only show the folder names in src/invoices/templates*/
        $handle = opendir("./templates/invoices/");
        while ($template = readdir($handle)) {
            if ($template != ".." && $template != "." && $template != "logos" && $template != ".svn" && $template != "template.php" && $template != "template.php~") {
                $files[] = $template;
            }
        }
        closedir($handle);
        sort($files);
        $escaped = htmlsafe($defaults[template]);