projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab5bb18
)
Do not allow editing of allocated sales invoices in Journal Inquiry.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 4 Jan 2012 23:33:38 +0000
(
00:33
+0100)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 4 Jan 2012 23:33:38 +0000
(
00:33
+0100)
gl/inquiry/journal_inquiry.php
patch
|
blob
|
history
diff --git
a/gl/inquiry/journal_inquiry.php
b/gl/inquiry/journal_inquiry.php
index dccef78f5c568c503730cb8c06bedfc5504eb6cc..2d9eaabc93e32715f000b502fe905132bf526a1c 100644
(file)
--- a/
gl/inquiry/journal_inquiry.php
+++ b/
gl/inquiry/journal_inquiry.php
@@
-107,7
+107,14
@@
function edit_link($row)
{
global $editors;
{
global $editors;
- return isset($editors[$row["type"]]) && !is_closed_trans($row["type"], $row["type_no"]) ?
+ $ok = true;
+ if ($row['type'] == ST_SALESINVOICE)
+ {
+ $myrow = get_customer_trans($row["type_no"], $row["type"]);
+ if ($myrow['alloc'] != 0 || get_voided_entry(ST_SALESINVOICE, $row["type_no"]) !== false)
+ $ok = false;
+ }
+ return isset($editors[$row["type"]]) && !is_closed_trans($row["type"], $row["type_no"]) && $ok ?
pager_link(_("Edit"),
sprintf($editors[$row["type"]], $row["type_no"], $row["type"]),
ICON_EDIT) : '';
pager_link(_("Edit"),
sprintf($editors[$row["type"]], $row["type_no"], $row["type"]),
ICON_EDIT) : '';