Fixed upgrade procedures (obsolete columns dropped in post_install phase), restored...
[fa-stable.git] / sales / customer_payments.php
index 3b44bc67e8613ee7bb906ae6eed66ff6da497777..c2f09eff56da7a50d62f1974539cea2b7fb1717e 100644 (file)
@@ -21,10 +21,10 @@ include_once($path_to_root . "/sales/includes/sales_db.inc");
 include_once($path_to_root . "/reporting/includes/reporting.inc");
 
 $js = "";
-if ($use_popup_windows) {
+if ($SysPrefs->use_popup_windows) {
        $js .= get_js_open_window(900, 500);
 }
-if ($use_date_picker) {
+if (user_use_date_picker()) {
        $js .= get_js_date_picker();
 }
 add_js_file('payalloc.js');
@@ -54,6 +54,7 @@ if (!isset($_POST['bank_account'])) { // first page call
                if($inv) {
                        $_SESSION['alloc']->person_id = $_POST['customer_id'] = $inv['debtor_no'];
                        $_SESSION['alloc']->read();
+                       $_POST['BranchID'] = $inv['branch_code'];
                        $_POST['DateBanked'] = sql2date($inv['tran_date']);
                        foreach($_SESSION['alloc']->allocs as $line => $trans) {
                                if ($trans->type == ST_SALESINVOICE && $trans->type_no == $_GET['SInvoice']) {
@@ -325,7 +326,7 @@ start_form();
        hidden('trans_no');
        hidden('old_ref', $old_ref);
 
-       start_outer_table(TABLESTYLE2, "width=60%", 5);
+       start_outer_table(TABLESTYLE2, "width='60%'", 5);
 
        table_section(1);
 
@@ -391,7 +392,7 @@ start_form();
        show_allocatable(false);
        div_end();
 
-       start_table(TABLESTYLE, "width=60%");
+       start_table(TABLESTYLE, "width='60%'");
 
        label_row(_("Customer prompt payment discount :"), $display_discount_percent);
 
@@ -411,4 +412,3 @@ start_form();
 
 end_form();
 end_page();
-?>