Sales invoice edit restriction on records imported from FA 1.xx
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 6 Apr 2008 09:15:12 +0000 (09:15 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 6 Apr 2008 09:15:12 +0000 (09:15 +0000)
CHANGELOG.txt
sales/customer_invoice.php

index d8e59a4d6dc56dd1760cce7bbae24134911ce7cd..a91753e4593ab3b7b1507d30fd41e4557a176d2c 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+06-Apr-200 Janusz Dobrowolski
+# Sales invoice edition denied for documents created in FA 1.xx because of nonportable differences in gl posting/db schema.
+  /sales/customer_invoice.php
+  
 05-Apr-2008 Joe Hunt
 # Fixed a bug when creating subfolder for new companies. Should be company id and not the table pref counter.
 $ /admin/create_coy.php
index ded481faf5e56747b229d3d00f7bbd3aab45baa4..4b40b81de6b59bfeb5743d78548a320de8341f63 100644 (file)
@@ -114,6 +114,12 @@ if ( (isset($_GET['DeliveryNumber']) && ($_GET['DeliveryNumber'] > 0) )
 
 } elseif (isset($_GET['ModifyInvoice']) && $_GET['ModifyInvoice'] > 0) {
 
+       if ( get_parent_trans(10, $_GET['ModifyInvoice']) == 0) { // 1.xx compatibility hack
+               echo"<center><br><b>" . _("There in no delivery notes for this invoice.<br>
+               Most likely this invoice was created in Front Accounting version prior to 2.0
+               and therefore can not be modified.") . "</b></center>";
+               display_footer_exit();
+       }
        processing_start();
        $_SESSION['Items'] = new Cart(10, $_GET['ModifyInvoice']);