Merged bugfixes upto [0000072] (version 2.0.3).
[fa-stable.git] / purchasing / supplier_credit.php
index 5729fcf53cd1bae720106b0304803b10b9eb9a7c..3f7e8ee7b47e289502926d74ad6951a11a93b987 100644 (file)
@@ -23,6 +23,18 @@ page(_("Supplier Credit Note"), false, false, "", $js);
 
 check_db_has_suppliers(_("There are no suppliers defined in the system."));
 
+//---------------------------------------------------------------------------------------------------------------
+if ($ret = context_restore()) {
+ // return from supplier editor
+       copy_from_trans($_SESSION['supp_trans']);
+       if(isset($ret['supplier_id']))
+               $_POST['supplier_id'] = $ret['supplier_id'];
+}
+if (isset($_POST['_supplier_id_editor'])) {
+       copy_to_trans($_SESSION['supp_trans']);
+       context_call($path_to_root.'/purchasing/manage/suppliers.php?supplier_id='.$_POST['supplier_id'], 'supp_trans');
+}
+
 //---------------------------------------------------------------------------------------------------------------
 
 if (isset($_GET['AddedID']))