X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ftypes.inc;h=79ef8be71c01699d87a8daf242fee733ad718fe3;hb=5089910120614dfb8b76a0271b43739f90f38b01;hp=570f0c68470dd36f593a19df7d5c4c79a5b3912b;hpb=d9b4de9d7e9d3ba77f6ece752fd6cc988effd8f1;p=fa-stable.git diff --git a/includes/types.inc b/includes/types.inc index 570f0c68..79ef8be7 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -47,6 +47,31 @@ define('ST_DIMENSION', 40); 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 // @@ -130,6 +155,12 @@ function payment_person_has_items($type) { return false; } } +//---------------------------------------------------------------------------------- +// Payment terms categories +// +define('PM_ANY', 0); +define('PM_CASH', 1); +define('PM_CREDIT', 2); //---------------------------------------------------------------------------------- // Manufacturing types @@ -187,6 +218,14 @@ define('TABLESTYLE_NOBORDER', 3); 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