[0004212] Work Order Entry: fixed error when voided WO refence is reused.
[fa-stable.git] / includes / references.inc
index a5e872d703e0dcee08afefff37dae24e039c29c0..7a919f27d43720094bf9ac746d90d74ad9e9ed46 100644 (file)
@@ -10,6 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 include_once($path_to_root . "/includes/db/class.reflines_db.inc");
+include_once($path_to_root . "/includes/types.inc");
 //---------------------------------------------------------------------------------------------
 // 2.4 - further changes toward removing refs table introduced:
 //     . all transactions now have references stored in trans table.
@@ -69,7 +70,7 @@ class references
 {
        var $reflines;
        
-       function references()
+       function __construct()
        {
                $this->reflines = new reflines_db();
        }
@@ -150,6 +151,7 @@ class references
                        }
                }
 
+               $out .= $template;      // add postfix
                if (!preg_match('/^([^\{]*)?\{([^\}]*)\}(.*)/', $out, $match)) {        // parse index
                        display_error(_("Missing numeric placeholder in refline definition."));
                        return $out;