$smarty->assign("FieldError", "{$a['cashbook_description']} - {$a['field_error']}"); UserInput("description"); $smarty->display('cashbook/newf.tpl'); } else { if (isset($startingwith) && $startingwith + $Cash_In_Hand - $expenditures < 0) { $smarty->assign("FieldError", "{$a['cashbook_expenditures']}"); UserInput("expenditures"); $smarty->display('cashbook/newf.tpl'); } else { if ($Cash_In_Hand_Till - $expenditures < 0) { $smarty->assign("FieldError", "{$a['cashbook_expenditures']}"); UserInput("expenditures"); $smarty->display('cashbook/newf.tpl'); } else { $Cash_In_Hand_Day = $Cash_In_Hand + ($takings - $expenditures); $Cash_In_Hand_Day = FormatDBNumber($Cash_In_Hand_Day); $cashbookdate = German_Mysql_Date($cashbookdate); $query4 = "INSERT INTO {$TBLName}cashbook (CASHBOOKID, MYID, INVOICEID, PAYMENTID, DESCRIPTION, CASHBOOK_DATE, TAKINGS, EXPENDITURES, CASH_IN_HAND, CASH_IN_HAND_STARTING_WITH, CANCELED, CREATEDBY, MODIFIEDBY, USERGROUP1, USERGROUP2, CREATED, MODIFIED)"; $query4 .= "VALUES(NULL, '', '', '', '{$description}', '{$cashbookdate}', '{$takings}', '{$expenditures}', '{$Cash_In_Hand_Day}', '{$startingwith}', '2', '{$_SESSION['Username']}', '{$_SESSION['Username']}', '{$_SESSION['Usergroup1']}', '{$_SESSION['Usergroup2']}', '{$CurrentDateTime}','{$CurrentDateTime}')"; if ($db->Execute($query4) === false) { die($db->ErrorMsg()); } $_SESSION['NewID'] = "1"; Header("Location: {$web}/cashbook/new.php?page={$page}&infoID={$infoID}&Order={$Order}&Sort={$Sort}&Canceled={$Canceled}&{$sessname}={$sessid}"); } } } } } } }
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once "../include/phprechnung.inc.php"; require_once "../include/smarty.inc.php"; CheckUser(); CheckAdminGroup1(); CheckSession(); $ArrayValue = CheckArrayValue($_REQUEST); foreach ($ArrayValue as $key => $val) { ${$key} = $val; $smarty->assign("{$key}", $val); } if (isset($Pos_Price)) { $Pos_Price = FormatDBNumber($Pos_Price); } function UserInput($mark) { global $smarty; $smarty->assign("mark", $mark); } if (empty($Pos_Name)) { $smarty->assign("FieldError", "{$a['pos_name']} - {$a['field_error']}"); UserInput("Pos_Name"); $smarty->display('position/newf.tpl'); } else { if (empty($Pos_Desc)) { $smarty->assign("FieldError", "{$a['pos_text']} - {$a['field_error']}"); UserInput("Pos_Desc"); $smarty->display('position/newf.tpl');
$invoiceID = ""; } if (empty($PaymentDate)) { $PaymentDate = date('d.m.Y'); } if (isset($Card_Number)) { $smarty->assign("CARD_NUMBER", "{$Card_Number}"); } if (isset($Valid_Thru)) { $smarty->assign("VALID_THRU", "{$Valid_Thru}"); } if (isset($Note)) { $smarty->assign("NOTE", "{$Note}"); } if (isset($Sum_Paid)) { $Sum_Paid = FormatDBNumber($Sum_Paid); } $smarty->assign("Title", "{$a['payment']} - {$a['new']}"); $smarty->assign("Payment_No", "{$a['payment_number']}"); $smarty->assign("Customer", "{$a['customer']}"); $smarty->assign("Customer_No", "{$a['customer_no']}"); $smarty->assign("Choose_Customer", "{$a['choose_customer']}"); $smarty->assign("CustMethodOfPayment", "{$a['cust_method_of_payment']}"); $smarty->assign("Choose", "{$a['choose']}"); $smarty->assign("Invoice_No", "{$a['invoice_number']}"); $smarty->assign("Invoice_Amount", "{$a['invoice_amount']}"); $smarty->assign("Open_Invoice", "{$a['open_invoice']}"); $smarty->assign("Card_Number", "{$a['card_number']}"); $smarty->assign("Valid_Thru", "{$a['valid_thru']}"); $smarty->assign("Outstanding_Payment", "{$a['outstanding_payment']}"); $smarty->assign("NoteMsg", "{$a['note']}");
$Tax3Total = FormatDBNumber($Tax3Total); } if (isset($Tax4Total)) { $Tax4Total = FormatDBNumber($Tax4Total); } if (isset($InvoiceSubtotal1)) { $InvoiceSubtotal1 = FormatDBNumber($InvoiceSubtotal1); } if (isset($InvoiceSubtotal2)) { $InvoiceSubtotal2 = FormatDBNumber($InvoiceSubtotal2); } if (isset($InvoiceSubtotal3)) { $InvoiceSubtotal3 = FormatDBNumber($InvoiceSubtotal3); } if (isset($InvoiceSubtotal4)) { $InvoiceSubtotal4 = FormatDBNumber($InvoiceSubtotal4); } function UserInput($mark) { global $smarty; $smarty->assign("mark", $mark); } if (!empty($InvoiceDate)) { list($day, $month, $year) = explode(".", $InvoiceDate); } if (!empty($MethodOfPaymentDate)) { list($day1, $month1, $year1) = explode(".", $MethodOfPaymentDate); } if (empty($myID)) { $smarty->assign("FieldError", "{$a['customer']} - {$a['field_error']}"); UserInput("New.Customer");
$Tax3Total = FormatDBNumber($Tax3Total); } if (isset($Tax4Total)) { $Tax4Total = FormatDBNumber($Tax4Total); } if (isset($OfferSubtotal1)) { $OfferSubtotal1 = FormatDBNumber($OfferSubtotal1); } if (isset($OfferSubtotal2)) { $OfferSubtotal2 = FormatDBNumber($OfferSubtotal2); } if (isset($OfferSubtotal3)) { $OfferSubtotal3 = FormatDBNumber($OfferSubtotal3); } if (isset($OfferSubtotal4)) { $OfferSubtotal4 = FormatDBNumber($OfferSubtotal4); } if (isset($infoID) && $infoID == '9') { $Searchstring = "OfferID1={$OfferID1}&CustomerID1={$CustomerID1}&DateFrom1={$DateFrom1}&DateTill1={$DateTill1}&Total1={$Total1}&Customer1={$Customer1}"; } function UserInput($mark) { global $smarty; $smarty->assign("mark", $mark); } if (!empty($OfferDate)) { list($day, $month, $year) = explode(".", $OfferDate); } if (!empty($MethodOfPaymentDate)) { list($day1, $month1, $year1) = explode(".", $MethodOfPaymentDate); }