From: Joe Hunt Date: Sun, 23 Nov 2008 23:20:44 +0000 (+0000) Subject: Preparing for graphic links X-Git-Tag: v2.4.2~19^2~1729 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=ba80e275bd7d437b92dd62eec01d97e461c74bce;p=fa-stable.git Preparing for graphic links --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f98177f1..3c3fb00e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/config.php b/config.php index b44956fd..8b213cf1 100644 --- a/config.php +++ b/config.php @@ -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"); diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 1fe5186e..93afe5c7 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -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'" : '') .">$value" - .($icon ? "" : '') + .($icon ? "" : '') ."\n"; if ($echo) echo $submit_str; diff --git a/reporting/includes/header2.inc b/reporting/includes/header2.inc index 16e97f9a..6c4e08a1 100644 --- a/reporting/includes/header2.inc +++ b/reporting/includes/header2.inc @@ -193,7 +193,7 @@ $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; diff --git a/reporting/rep601.php b/reporting/rep601.php index 2a3ee811..a6a178b5 100644 --- a/reporting/rep601.php +++ b/reporting/rep601.php @@ -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); diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index c1fe085f..c5983db6 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -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'); } diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index b8e555bb..24f31483 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -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); } diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index db81c1ce..95939b5d 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -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 index 00000000..c566bb80 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 index 00000000..c566bb80 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 index 00000000..c566bb80 Binary files /dev/null and b/themes/default/images/ok.gif differ