define ('ST_STATEMENT', 91);
define ('ST_CHEQUE', 92);
+// document inheritance
+$document_child_types = array(
+ ST_SALESQUOTE => ST_SALESORDER,
+ ST_SALESORDER => ST_CUSTDELIVERY,
+ ST_CUSTDELIVERY => ST_SALESINVOICE,
+ ST_SALESINVOICE => ST_CUSTCREDIT,
+
+ ST_PURCHORDER => ST_SUPPRECEIVE,
+ ST_SUPPRECEIVE => ST_SUPPINVOICE,
+ ST_SUPPINVOICE => ST_SUPPCREDIT,
+);
+
+function get_child_type($type)
+{
+ global $document_child_types;
+ return isset($document_child_types[$type]) ? $document_child_types[$type] : 0;
+}
+
+function get_parent_type($type)
+{
+ global $document_child_types;
+ $child = array_search($type, $document_child_types);
+ return $child ? $child : 0;
+}
+
//----------------------------------------------------------------------------------
// Bank transaction types
//
define('TAG_ACCOUNT', 1);
define('TAG_DIMENSION', 2);
+//----------------------------------------------------------------------------------
+// Payment term types
+
+define('PTT_PRE', 1);
+define('PTT_CASH', 2);
+define('PTT_DAYS', 3);
+define('PTT_FOLLOWING', 4);
+
include_once($path_to_root . '/includes/sysnames.inc');
?>
\ No newline at end of file