Preparing for graphic links
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 23 Nov 2008 23:20:44 +0000 (23:20 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 23 Nov 2008 23:20:44 +0000 (23:20 +0000)
CHANGELOG.txt
config.php
includes/ui/ui_input.inc
reporting/includes/header2.inc
reporting/rep601.php
sales/includes/ui/sales_order_ui.inc
sales/inquiry/customer_inquiry.php
sales/sales_order_entry.php
themes/aqua/images/ok.gif [new file with mode: 0644]
themes/cool/images/ok.gif [new file with mode: 0644]
themes/default/images/ok.gif [new file with mode: 0644]

index f98177f1ad943952e788d7c7ece8754ca74a093a..3c3fb00e948bec781ec160cabaa14bd52759615f 100644 (file)
@@ -19,6 +19,22 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+24-Nov-2008 Joe Hunt
+! Preparing for graphic Links
+$ config.php
+  /includes/ui/ui_input.inc
+  /sales/sales_order_entry.php
+  /sales/includes/ui/sales_order_ui.inc
+  /themes/aqua/images/ok.gif
+  /themes/cool/images/ok.gif
+  /themes/default/images/ok.gif
+# Small layout bug in header2.inc
+$ /reporting/includes/header2.inc
+# Small layout bug in report bank statement
+$ /reporting/rep601.php
+# Restriction on links
+$ /sales/inquiry/customer_inquiry.php
+
 22-Nov-2008 Joe Hunt
 + Preparing for Graphic Links final.Optimized.
 $ config.php
index b44956fd409263da6025e391b82162fc0a959615..8b213cf1e7ca2ea975ed4d03344398cb46471679 100644 (file)
@@ -184,7 +184,10 @@ if (!defined('ICON_EDIT'))
 {
        define("ICON_EDIT", "edit.gif");        
        define("ICON_DELETE", "delete.gif");    
-       define("ICON_ADD", "add.png");  
+       define("ICON_ADD", "ok.gif");   
+       define("ICON_UPDATE", "ok.gif");        
+       define("ICON_OK", "ok.gif");    
+       define("ICON_CANCEL", "delete.gif");    
        define("ICON_GL", "gl.png");    
        define("ICON_PRINT", "print.png");      
        define("ICON_PDF", "pdf.gif");  
index 1fe5186e05ce35f6837b0bc0fa9d1124851b83aa..93afe5c72a1d5de4f5b2b35e90db71c5391460e3 100644 (file)
@@ -117,7 +117,7 @@ function submit($name, $value, $echo=true, $title=false, $async=false, $icon=fal
            ." name=\"$name\"  id=\"$name\" value=\"$value\""
            .($title ? " title='$title'" : '')
            ."><span>$value</span>"
-               .($icon ? "<img src='$path_to_root/themes/default/images/$icon'>" : '')
+               .($icon ? "<img src='$path_to_root/themes/".user_theme()."/images/$icon'>" : '')
                ."</button>\n";
        if ($echo)
                echo $submit_str;
index 16e97f9a1b542345d6f9bfa70b5b1ef9ddac8995..6c4e08a1058997d3d34aad6b7573287dfcb53be9 100644 (file)
                $col += $width; 
                if ($doctype == 9)
                        $this->TextWrap($col, $this->row, $width, sql2date($myrow['delivery_date']), 'C');
-               else if ($doctype != 8 && isset($myrow['due_date']))
+               else if ($doctype != 8 && $doctype != 11 && isset($myrow['due_date']))
                        $this->TextWrap($col, $this->row, $width, sql2date($myrow['due_date']), 'C');
                
                $this->row = $iline5 - $this->lineHeight - 1;
index 2a3ee811cdd235eb9dc8e8f450d30ca4ed3202e1..a6a178b5865a428c5694b16f95f84a91852fcc5b 100644 (file)
@@ -88,9 +88,9 @@ function print_bank_transactions()
                $rep->TextCol(0, 3,     $act);
                $rep->TextCol(3, 5, _('Opening Balance'));
                if ($prev_balance > 0.0)
-                       $rep->TextCol(6, 7,     number_format2(abs($prev_balance), $dec));
+                       $rep->TextCol(5, 6,     number_format2(abs($prev_balance), $dec));
                else
-                       $rep->TextCol(7, 8,     number_format2(abs($prev_balance), $dec));
+                       $rep->TextCol(6, 7,     number_format2(abs($prev_balance), $dec));
                $rep->Font();
                $total = $prev_balance;
                $rep->NewLine(2);
@@ -122,9 +122,9 @@ function print_bank_transactions()
                $rep->Font('bold');
                $rep->TextCol(3, 5,     _("Ending Balance"));
                if ($total > 0.0)
-                       $rep->TextCol(6, 7,     number_format2(abs($total), $dec));
+                       $rep->TextCol(5, 6,     number_format2(abs($total), $dec));
                else
-                       $rep->TextCol(7, 8,     number_format2(abs($total), $dec));
+                       $rep->TextCol(6, 7,     number_format2(abs($total), $dec));
                $rep->Font();
                $rep->Line($rep->row - $rep->lineHeight + 4);
                $rep->NewLine(2, 1);
index c1fe085f1895c5e2658f627be703f913933811e9..c5983db67a4a7be81e17492249609ade89f4ee0e 100644 (file)
@@ -136,7 +136,7 @@ function display_order_summary($title, &$order, $editable_items=false)
                        {
                                edit_button_cell("Edit$line_no", _("Edit"),
                                _('Edit document line'));
-                               edit_button_cell("Delete$line_no", _("Delete"),
+                               delete_button_cell("Delete$line_no", _("Delete"),
                                _('Remove line from document'));
                        }
                        end_row();
@@ -446,10 +446,10 @@ function sales_order_item_controls(&$order, &$rowcounter, $line_no=-1)
 
        if ($id!=-1)
        {
-               edit_button_cell('UpdateItem', _("Update"),
-                               _('Confirm changes'));
-               edit_button_cell('CancelItemChanges', _("Cancel"),
-                               _('Cancel changes'));
+               button_cell('UpdateItem', _("Update"),
+                               _('Confirm changes'), ICON_UPDATE);
+               button_cell('CancelItemChanges', _("Cancel"),
+                               _('Cancel changes'), ICON_CANCEL);
                hidden('LineNo', $line_no);
                set_focus('qty');
        }
index b8e555bbc3389464550f2f4ab8bb81eee990b208..24f3148300c3057d1a2fefca48e61032823f6155 100644 (file)
@@ -155,7 +155,7 @@ function fmt_credit($row)
 
 function credit_link($row)
 {
-       return $row['type'] == 10 ?
+       return $row['type'] == 10 && $row["TotalAmount"] - $row["Allocated"] > 0 ?
                pager_link(_("Credit This"),
                        "/sales/customer_credit_invoice.php?InvoiceNumber=".
                        $row['trans_no'], ICON_CREDIT)
@@ -168,24 +168,31 @@ function edit_link($row)
 
        switch($row['type']) {
        case 10:
-               $str = "/sales/customer_invoice.php?ModifyInvoice=".$row['trans_no'];
+               if (get_voided_entry(10, $row["trans_no"]) === false && $row['Allocated'] == 0)
+                       $str = "/sales/customer_invoice.php?ModifyInvoice=".$row['trans_no'];
                break;
        case 11:
-               if ($row['order_']==0) // free-hand credit note
-                   $str = "/sales/credit_note_entry.php?ModifyCredit=".$row['trans_no'];
-               else    // credit invoice
-                   $str = "/sales/customer_credit_invoice.php?ModifyCredit=".$row['trans_no'];
+               if (get_voided_entry(11, $row["trans_no"]) === false && $row['Allocated'] == 0) // 2008-11-19 Joe Hunt
+               {        
+                       if ($row['order_']==0) // free-hand credit note
+                           $str = "/sales/credit_note_entry.php?ModifyCredit=".$row['trans_no'];
+                       else    // credit invoice
+                           $str = "/sales/customer_credit_invoice.php?ModifyCredit=".$row['trans_no'];
+               }           
                break;
         case 13:
-               $str = "/sales/customer_delivery.php?ModifyDelivery=".$row['trans_no'];
+               if (get_voided_entry(13, $row["trans_no"]) === false)
+                       $str = "/sales/customer_delivery.php?ModifyDelivery=".$row['trans_no'];
                break;
        }
-       return pager_link(_('Edit'), $str, ICON_EDIT);
+       if ($str != "")
+               return pager_link(_('Edit'), $str, ICON_EDIT);
+       return '';      
 }
 
 function prt_link($row)
 {
-       if ($row['type'] != 12) // customer payment printout not defined yet.
+       if ($row['type'] != 12 && $row['type'] != 2) // customer payment or bank deposit printout not defined yet.
                return print_document_link($row['trans_no'], _("Print"), true, $row['type'], ICON_PRINT);
 }
 
index db81c1ce0cf994015093bd9812024e86d4c13b60..95939b5d41268aaa579538dd75a12e86b197f724 100644 (file)
@@ -517,15 +517,15 @@ if ($customer_error == "") {
        if ($_SESSION['Items']->trans_no == 0) {
 
                submit_center_first('ProcessOrder', $porder,
-                   _('Check entered data and save document'), true, 'confirm.png');
+                   _('Check entered data and save document'), true, ICON_OK);
        } else {
                submit_center_first('ProcessOrder', $corder,
-                   _('Validate changes and update document'), true, 'confirm.png');
+                   _('Validate changes and update document'), true, ICON_OK);
        }
 
        submit_center_last('CancelOrder', $cancelorder,
           _('Cancels document entry or removes sales order when editing an old document'),
-          true, 'escape.png');
+          true, ICON_CANCEL);
 } else {
        display_error($customer_error);
 }
diff --git a/themes/aqua/images/ok.gif b/themes/aqua/images/ok.gif
new file mode 100644 (file)
index 0000000..c566bb8
Binary files /dev/null and b/themes/aqua/images/ok.gif differ
diff --git a/themes/cool/images/ok.gif b/themes/cool/images/ok.gif
new file mode 100644 (file)
index 0000000..c566bb8
Binary files /dev/null and b/themes/cool/images/ok.gif differ
diff --git a/themes/default/images/ok.gif b/themes/default/images/ok.gif
new file mode 100644 (file)
index 0000000..c566bb8
Binary files /dev/null and b/themes/default/images/ok.gif differ