<?php

global $systypes_array, $bank_account_types, $bank_transfer_types, 
	$payment_person_types, $wo_types_array, $wo_cost_types, $class_types,
	$quick_actions, $quick_entry_types, $stock_types, $tag_types, $bank_owner;


//----------------------------------------------------------------------------
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// Amended System Names from the original sysnames
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//----------------------------------------------------------------------------


$stock_types = array(
	'M' => _("Manufactured"),
	'B' => _("Stock"),
	'D' => _("Non-stock")
);

$payment_person_types = array (
	PT_MISC => _("Miscellaneous"),
	PT_WORKORDER => _("Work Order"),
	PT_CUSTOMER => _("Customer"),
	PT_SUPPLIER => _("Supplier"),
	PT_EMPLOYEE => _("Employee"),
	PT_QUICKENTRY => _("Quick Entry"),
	PT_FLOAT => _("Float")
	);


//----------------------------------------------------------------------------
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// New System Names
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//---------------------------------------------------------------------------=



$systypes_array = array_replace($systypes_array, array(   

        ST_POINTSUPDATE => _("Loyalty Points Update"),
        ST_RAW_MATERIAL_ISSUE => _("Raw Material Issue"),
        ST_RAW_MATERIAL_RETURN => _("Raw Material Return"),
        ST_PROD_ADD => _("Production Receipt"),
        ST_PROD_RETURN => _("Production Return"),
        ST_MATERIAL_REQ => _("Material Requisition"),
        ST_REQTRANSFER => _('Requisition Transfer'),
        ST_PAYROLL => _('Payroll'),
        ST_SALARY_ADVANCE_PAYMENT => _('Salary Advance Payment'),
        ST_MATERIAL_ISSUE => ('Material Issue'),
        ST_MATERIAL_RETURN => ('Material Return'),
        ST_STOCK_COUNT => _('Stock Count'),
        ST_INVENTORY_RECEIPT => _("Inventory Receipt"),
        ST_INVENTORY_ISSUE => _("Inventory Issue"),
        ST_PURCH_REQ => _("Purch. Requisition"),
        ST_PR_ISSUE => _("PR Issues"),
        ST_MANUF_REQUEST => _("Manuf. Request"),
        ST_MANUF_REQUIREMENT => _("Manuf. Requirement"),
        ST_I_OWE_YOU => _("I Owe You"),
        ST_I_OWE_YOU_BATCH => _("I Owe You Batch"),
        ST_VEHICLE_RUNNING_CHART => _("Vehicle Running Chart"),
        ST_PROJECT_INVOICE => _("Project Invoice"),
        ST_PROJECT_CREDIT_NOTE => _("Project Credit Note"),
        ST_STOCK_RESERVATION => _("Stock Reservation"),
        ST_STOCK_RELEASE => _("Stock_Reservation Release"),
        ST_PROJECT_COST_ADJUST => _("Project Cost Adjustment"),
        ST_PROJECT_ALLOC_ADJUST => _("Project Allocation Adjustment"),
        ST_SUPPLIER_TRANSPORT_INVOICES => _("Supplier Transport Invoice"),
        ST_SUBCONTRACTOR_INVOICE => _("Subcontractor Invoice"),
        ST_PETTY_CASH_FLOAT_REIMBUR => _("Float Reimbursement"),
        ST_VEHICLE_RUNNING_CHART_BATCH => _("Vehicle Running Chart Batch"), 
        ST_UTILITY_BILLS => _("Utility Bill"), 
        ST_SUBCONTRACTOR_PURCH_ORDER => _("Subcontractor Purchase Order"),
        ST_SUBCONTRACTOR_CREDIT_NOTE => _("Subcontractor Credit Note"),
        ST_MISCELLANEOUS_PROJECT_COST => _("Miscellaneous Project Costs"),
        ST_UTILITY_BILL_CREDIT_NOTE => _("Utility Bill Credit Note"),
        ST_TOOL_REQUEST => _("Tool Requests"),
        ST_TOOL_USAGE_CHARGE => _("Tool Usage Charge"),
        ST_TOOL_ISSUE => _("Tool Issue"),
        ST_COMP_LOAN_REPAYMENT => _("Loan Repayment"),
        ST_VEHICLE_ALLOCATION => _("Vehicle Allocation"),
        ST_PETTY_CASH => _("Petty Cash Expense"),
        ST_VEHICLE_REQUEST => _("Vehicle Request"),
        ST_STOCK_ASSET_TRANSFER => _("Stock Asset Transfer"),
        ST_APPROVE_PROJECT => _("System Project"),
        ST_APPROVE_EST_PROJECT => _("Estimation Project"),
        ST_MONTHLY_PROJECT_COSTS => _("Monthly Project Costs"),
        ST_RAW_MATERIAL_REQ => _("Raw Material Request"),
        ST_I_OWE_YOU_PAYMENT => _("I Owe You Payment"),
        ST_PETTY_CASH_FLOAT_ADJ => _("Petty Cash Float Adjustment"),
        ST_PROJECT_PAYMENT_APPLICATION => _("Project Payment Application"),
        ST_TOOL_RETURN => _("Tool Return"),
        ST_PROJECT_FLOAT_ADJ => _("Project Float Adjustment"),
        ST_PROJECT_ADVANCE_BATCH => _("Project Advance Batch"),
        ST_TRANSFERREQ => _("Stock Transfer Requisition"),  
        ST_INVENTORY_RECEIPT_REQUEST => _("Inventory Receipt Request"),
        ST_INVENTORY_ISSUE_REQUEST => _("Inventory Issue Request"),  
        ST_ASSET_TRANSFER_REQUEST => _("Asset Transfer Request"),
        ST_ASSET_TRANSFER => _("Asset Transfer"),  
        ST_ASSET_QUANTITY_ADJUSTMENT_REQUEST => _("Asset Quatity Adjustement Request"),
        ST_ASSET_QUANTITY_ADJUSTMENT => _("Asset Quatity Adjustement"),  
        ST_CUSTOMER_PAYMENT_RETURN => _("Customer Payment return"),  
        ST_SITE_MATERIAL_RETURN => _("Site Material return"),    
        ST_PETTY_CASH_DIRECT_PAYMENTS => _("Direct Petty Cash Payment"), 
        ST_PAYROLL => _("Payroll"),
	ST_FI_BATCH  => _("FI Batch"),
        ST_GL_BATCH  => _("GL Batch"),
        ST_PROJECT_ADVANCE  => _("Project Float Advance"),
        ST_PETTY_CASH_PAYMENT  => _("Petty Cash Payment"),
        ST_I_OWE_YOU_ADVANCES  => _("I Owe You Advance"),
        ST_ASSET_DEPRECIATION_RUN  => _("Asset depreciation Run"),
        ST_CASH_PAYMENT => _("Cash Payment"), 
        ST_CASH_RECEIPT => _("Cash Receipt"), 
        ST_GL_DEBIT => _("GL Debit"), 
        ST_GL_CREDIT => _("GL Credit"), 
        ST_ITEM_COSTUPDATE => _("Stock Item Cost Update"), 
        ST_PR_RETURN => _("Purchase Requisition Return"), 
        ST_MONTH_CASH_IN_AJUSTMENT => _("Month Cash In Adjustment"), 
        ST_MONTH_CASH_OUT_AJUSTMENT => _("Month Cash Out Adjustment"),     
        ST_PETTY_CASH_ITEM_RECEIPT => "Petty Cash Item Receive",
        ST_IOU_BANKPAYMENT => "IOU Bank Payment",
        ST_PETTY_CASH_ITEM_ISSUE => "Petty Cash Item Issue",
        ST_APPROVE_PROJECT => "Approve Project",
        ST_IOU_BANKPAYMENT_RETURN => "IOU Bank Return",
        ST_MATERIAL_TRANSFER_RECEIPT => "Material Transfer Receipt",
        ST_DAILY_ITEM_ISSUE => "Daily Item Issue", 
        ST_DAILY_ITEM_RETURN => "Daily Item Return", 
        ST_DAILY_TOOL_ISSUE => "Daily Tool Issue", 
        ST_DAILY_TOOL_RETURN => "Daily Tool Return", 
        ST_JOB_COST_ADDITION => "Job Cost Addition", 
        ST_JOB_COST_DEDUCTION => "Job Cost Deduction",
        ST_ASSET_VERIFICATION => "Asset Verification", 
        ST_BATCH_BANK_TRANSFER_REQ => "Batch Bank Transfer Request", 
        ST_COMP_PL_EXPENSES_ADJUSTMENTS => "Company P&L Expenses Adjustment", 
        ST_COMP_PL_INCOME_ADJUSTMENTS => "Company P&L Income Adjustment",
        ST_BATCH_ITEM_ISSUE => "Batch Item Issue",
        ST_ASSET_REQUISITION_TRANSFER => "Asset Transfer Issue",
        ST_ASSET_TRANSFER_RECEIPT => "Asset Tranfer Receipt",
        ST_POS_INVOICE => "POS Invoice",
        ST_LOT_ADJUSTMENT => "Lot Adjustment",
        ST_ITEM => "Item",
        ST_UTILITY_BILL_STOCK_RECEIPT => "Utility Bill Stock Receipt",
        ST_FLOAT_RECEIPT => "Float Receipt",
        ST_FLOAT_PAYMENT => "Float Payment",
        ST_EMPLOYEE_ATTENDANCE => "Employee Attendance",
        ST_POS_CREDIT_NOTE => "POS Credit Note",
        ST_POS_ITEM_ISSUE => "POS Item Issue",
        ST_POS_ITEM_RETURN => "POS Item Return",
        ST_POS_CUSTOMER_PAYMENT => "POS Customer Payment",
        ST_SALARY_ADVANCE => "Salary Advance",
        ST_FLOAT_TRANSFER => "Float Transfer",
        ST_POS_CUSTOMER_RETURN => "POS Customer Return",

    
    ));




$jobq_request_statues = array(
	JQ_NEW => _("New"),
	JQ_PROCESSING => _("Processing"),
	JQ_COMPLETED => _("Completed"),
        JQ_ERROR => _("Error"),
	JQ_END_REQESTED => _("End Reqested"),
        JQ_ENDED => _("Ended")
);



$approval_statuses = array(
	AS_NEW => _("New"),
        AS_WITH_THE_APPROVER => _("With The Approver"),
	AS_AWAITING_APPROVAL => _("Awaiting Approval"),
	AS_APPROVED => _("Approved"),
        AS_REJECTED => _("Rejected"),
        AS_ISSUED => _("Issued"),
	AS_RECEIVED => _("Received"),
	AS_TRANSFERRED => _("Transferred"),
        AS_COMPLETED => _("Completed"),
        AS_REOPENED => _("Reopened"),
        AS_BACK_TO_ORIGINATOR => _("Back to Originator"),
        AS_CLOSED => _("Closed"),
        AS_PROCESSED => _("Processed"), 
        AS_ADMIN_CLOSED => _("Closed by Admin"), 
        AS_POSTED => _("Posted"),
        AS_PAID => _("Paid"),
        AS_DELIVERED => _("Delivered")
);



$stock_counting_statuses = array(
    SC_NEW => _("New"),
    SC_COUNTING => _("Counting"),
    SC_COUNTED => _("Counted"),
    SC_COMPLETING => _("Completing"),
    SC_COMPLETED => _("Completed"),
    SC_PROCESSING => _("Processing"),
    SC_PROCESSED => _("Processed"),
    SC_IGNORED => _("Ignored")
);




$manufacturing_requirement_types = array(
    ST_SALESORDER => "Sales Orders",
    ST_MANUF_REQUEST => "Manuf. Request"
);



//----------------------------------------------------------------------------------
// Workorder Process Work Types

//

$workorder_process_work_types = array(
    WOPWT_SETUP => "Setup",
    WOPWT_PROCESSING => "Processing", 
    WOPWT_CLEANING => "Cleaning"
);





$approval_path_types = array(
    ST_MATERIAL_REQ => "Material Requisitions",
    ST_TRANSFERREQ => "Material Transfer Requisitions",
    ST_PURCH_REQ => "Purchase Requsitions",
    ST_PURCHORDER => "Purchase Orders",
    ST_WORKORDER => "Work Orders",
    ST_I_OWE_YOU => "I Owe Yous"
);

    

      

$petty_cash_float_transaction_types = array(
    ST_PETTY_CASH_FLOAT_ADJ => "Petty Cash Float Entry",
    ST_PETTY_CASH_FLOAT_REIMBUR => "Petty Cash Float Reimbursement", 
    ST_I_OWE_YOU => $systypes_array[ST_I_OWE_YOU],
    ST_I_OWE_YOU_PAYMENT => "I Owe You Payment",
    ST_I_OWE_YOU_BATCH => "Expenses Batch",
    ST_I_OWE_YOU_ADVANCES => "I Owe You Advance",
    ST_I_OWE_YOU_ADVANCES_BATCH => "I Owe You Advances Batch",
    ST_PROJECT_ADVANCE => "Project Float Advance",
    ST_PROJECT_ADVANCE_BATCH => "Project Float Advances Batch",
    ST_PETTY_CASH_DIRECT_PAYMENTS => "Direct Petty Cash Payment",
    ST_PETTY_CASH_PAYMENT => "Petty Cash Payment",
    ST_SUPPAYMENT => "Supplier Payment",
    ST_CASH_PAYMENT => $systypes_array[ST_CASH_PAYMENT],
    ST_CASH_RECEIPT => $systypes_array[ST_CASH_RECEIPT],
    ST_BANKPAYMENT => $systypes_array[ST_BANKPAYMENT],
    ST_BANKDEPOSIT => $systypes_array[ST_BANKDEPOSIT],
    ST_GL_DEBIT => $systypes_array[ST_GL_DEBIT],
    ST_GL_CREDIT => $systypes_array[ST_GL_CREDIT],
    ST_FLOAT_TRANSFER => $systypes_array[ST_FLOAT_TRANSFER]

);



    

      

$project_float_transaction_types = array(
    ST_PROJECT_FLOAT_ADJ => "Project Float Entry",
    ST_PETTY_CASH_FLOAT_REIMBUR => "Petty Cash Float Reimbursement", 
    ST_I_OWE_YOU_PAYMENT => "I Owe You Payment",
    ST_PETTY_CASH_PAYMENT => "Petty Cash Payment",
    ST_I_OWE_YOU_BATCH => "Expenses Batch",
    ST_I_OWE_YOU_ADVANCES_BATCH => "I Owe You Advance",
    ST_PROJECT_ADVANCE_BATCH => "Project Advance Batch",
    ST_PETTY_CASH_DIRECT_PAYMENTS => "Direct Petty Cash Payment",
    ST_IOU_BANKPAYMENT => $systypes_array[ST_IOU_BANKPAYMENT]

);





//----------------------------------------------------------------------------------



$project_billing_types = array(
    PBT_NO_BILLING_TYPE => _("No Billing Type"),
    PBT_LUMP_SUM => _("Lump Sum"),
    PBT_MEASURE_PAY => _("Measure and Pay")	
);





//----------------------------------------------------------------------------------



$project_invoice_line_types = array(
   PILT_DETAIL => _("Detail Item"), 
   PILT_MAIN_HEADER => _("Main Group Header"), 
   PILT_MAIN_ITEM => _("Main Group Item"), 
   PILT_MAIN_SUMMARY => _("Main Group Summary"), 
   PILT_SUB_HEADER => _("Sub Group Header"),
   PILT_SUB_ITEM => _("Sub Group Item"), 
   PILT_SUB_SUMMARY => _("Sub Group Summary"), 
   PILT_FINAL_TOTAL => _("Final Total")   
);



//----------------------------------------------------------------------------------



$inventory_transaction_types = array(		
    ST_MATERIAL_ISSUE => $systypes_array[ST_MATERIAL_ISSUE],
    ST_MATERIAL_RETURN => $systypes_array[ST_MATERIAL_RETURN],
    ST_PR_ISSUE => $systypes_array[ST_PR_ISSUE],
    ST_INVENTORY_RECEIPT => $systypes_array[ST_INVENTORY_RECEIPT],
    ST_INVENTORY_ISSUE => $systypes_array[ST_INVENTORY_ISSUE],
    ST_INVADJUST  => $systypes_array[ST_INVADJUST],
    ST_LOCTRANSFER => $systypes_array[ST_LOCTRANSFER],
    ST_REQTRANSFER => $systypes_array[ST_REQTRANSFER],    
    ST_RAW_MATERIAL_ISSUE => $systypes_array[ST_RAW_MATERIAL_ISSUE],
    ST_RAW_MATERIAL_RETURN => $systypes_array[ST_RAW_MATERIAL_RETURN],
    ST_MANUISSUE => $systypes_array[ST_MANUISSUE],
    ST_MANURECEIVE => $systypes_array[ST_MANURECEIVE],
    ST_STOCK_RESERVATION => $systypes_array[ST_STOCK_RESERVATION],
    ST_STOCK_RELEASE => $systypes_array[ST_STOCK_RELEASE] 
);





$project_boq_item_component_primary_types = array(		
    BOQPT_COST => _("Cost"),			
    BOQPT_MATERIAL => _("Material"),			
    BOQPT_LABOUR => _("Labour"),			
    BOQPT_ASSET => _("Asset"),			
    BOQPT_TRANSPORT => _("Transport")		
);







$insuree_types = array(		
    INSU_REFERENCE => _("Reference"),
    INSU_VEHICLE => _("Vehicle"),			
    INSU_ASSET => _("Asset"),			
    INSU_EMPLOYEE => _("Employee"),			
    INSU_ITEM => _("Inventory Item"),			
    INSU_CUSTOMER => _("Customer")     
);



//----------------------------------------------------------------------------------



$supplier_invoice_source_types = array(
    ST_SUPPRECEIVE => _("GRNs"),
    SIST_MISCELLANEOUS => _("Miscellaneous"),
    ST_SUPPLIER_TRANSPORT_INVOICES => _("Transport Invoice")
);







$direct_petty_cash_payment_expense_sources = array(
//    ST_SUPPLIER_TRANSPORT_INVOICES => _("Transport_invoice"),
    ST_VEHICLE_RUNNING_CHART => _("Vehicle Running Chart"),
    ST_VEHICLE_ALLOCATION => _("Vehicle Allocations"),
    ST_SUPPLIER_TRANSPORT_INVOICES => $systypes_array[ST_SUPPLIER_TRANSPORT_INVOICES]

);



$supplier_invoice_payment_source_types = array(
    ST_SUPPINVOICE => _("Supplier Invoice"),
    ST_PETTY_CASH_DIRECT_PAYMENTS => _("Direct Petty cash Paymet")
);



$system_payment_types = array(
    ST_SUPPAYMENT => _("Supplier Payment"),
    ST_BANKPAYMENT => _("Bank Paymet")
);





$fixed_deposit_security_type = array(
    ST_CREDIT_FACILITY => _("Credit Facility"),
    ST_COMPANY_LOANS => _("Company Loans")    

);





$order_category_types = array(
    OCT_SALES => _("Sales"),
    OCT_PURCHASE => _("Purchase")

);





$project_sales_order_item_types = array(
    PSOIT_TEXT => _("Text"),
    PSOIT_BOQ_ITEM => _("BOQ Item"),
    PSOIT_STOCK_ITEM => _("Stock Item")
);





$subconractor_invoice_item_types = array(
    SCIIT_TEXT => _("Text"),
    SCIIT_BOQ_ITEM => _("BOQ Item"),
    SCIIT_PO_LINE => _("PO Line")

);





$subconractor_credit_note_item_types = array(
    SCCNIT_TEXT => _("Text"),
    SCCNIT_BOQ_ITEM => _("BOQ Item"),
    SCCNIT_INV_LINE => _("Invoice Line")       

);





$monthly_project_costs_base_totals = array(
    MPCBT_MANUAL_COST => "Manual Cost" 
//    MPCBT_DEPARTMENT_SALARY_COST => "Department Salary Cost",
//    MPCBT_EMPLOYEE_COST => "Employee Cost"
//    MPCBT_PROJECT_EXPENSES => "Project Expenses",
//    MPCBT_PROJECT_RECEIPTS => "Project Receipts",
//    MPCBT_PROJECT_COLLECTION => "Project Collection",

);



//----------------------------------------------------------------------------------



$monthly_project_costs_distribution_types = array(
    MPCDT_MANUAL => "Manual",
//    MPCDT_PROJECT_EXPENSES => "Project Expenses",
//    MPCDT_PROJECT_RECEIPTS => "Project Receipts",
//    MPCDT_PROJECT_COLLECTION => "Project Collection",
    MPCDT_PROJECT_TOTAL_COST => "Project Total Cost",
    MPCDT_EQUALLY => "Equally",
    MPCDT_SAME_VALUE => "Same Value" 
//    MPCDT_EMPLOYEE_COST => "Employee Cost"
);



//--------------------------------------------------------------------------------------



$customer_transaction_types = array (
    ST_BANKPAYMENT => $systypes_array[ST_BANKPAYMENT],
    ST_BANKDEPOSIT => $systypes_array[ST_BANKDEPOSIT],
    ST_SALESINVOICE => $systypes_array[ST_SALESINVOICE],
    ST_CUSTCREDIT => $systypes_array[ST_CUSTCREDIT],
    ST_CUSTPAYMENT => $systypes_array[ST_CUSTPAYMENT],
    ST_CUSTDELIVERY => $systypes_array[ST_CUSTDELIVERY],
    ST_PROJECT_INVOICE => $systypes_array[ST_PROJECT_INVOICE],
    ST_PROJECT_CREDIT_NOTE => $systypes_array[ST_PROJECT_CREDIT_NOTE],
    ST_CUSTOMER_PAYMENT_RETURN => $systypes_array[ST_CUSTOMER_PAYMENT_RETURN],
    ST_CASH_PAYMENT => $systypes_array[ST_CASH_PAYMENT],
    ST_CASH_RECEIPT => $systypes_array[ST_CASH_RECEIPT],
    ST_GL_CREDIT => $systypes_array[ST_GL_CREDIT],
    ST_GL_DEBIT => $systypes_array[ST_GL_DEBIT]

);



//--------------------------------------------------------------------------------------

$project_types = array(
    PROJ_TYPE_CONSUMPTION => "Consumption",
    PROJ_TYPE_STOCK => "Stock",
    PROJ_TYPE_DEPT_EXPENSES => "Department Expenses",
    PROJ_TYPE_SALES_COST => "Sales Costs" 
);



//--------------------------------------------------------------------------------------

$expense_categories = array(
    EC_PETTY_CASH_EXPENSE => "General Expense", //Hide in Utility Bills
    EC_STOCK_ITEM_RECEIPT => "Stock Item Receipt", // Use a different program to receive items due to partial and late supplies
    EC_ASSET_MAINTENANCE => "Asset", // Display asset list
    EC_VEHICLE_MAINTENANCE => "Vehicle", // Display vehicle list
    EC_UTILITY_ITEM => "Utility Item", // Display utility item list (a list value list)    
);





//--------------------------------------------------------------------------------------



$bank_transaction_types = array (
    ST_BANKPAYMENT => $systypes_array[ST_BANKPAYMENT],
    ST_BANKDEPOSIT => $systypes_array[ST_BANKDEPOSIT],
    ST_BANKTRANSFER => $systypes_array[ST_BANKTRANSFER], 
    ST_CUSTPAYMENT => $systypes_array[ST_CUSTPAYMENT],
    ST_SUPPAYMENT => $systypes_array[ST_SUPPAYMENT],
    ST_PETTY_CASH_FLOAT_REIMBUR => $systypes_array[ST_PETTY_CASH_FLOAT_REIMBUR],
    ST_COMP_LOAN_REPAYMENT => $systypes_array[ST_COMP_LOAN_REPAYMENT],
);



//----------------------------------------------------------------------------------



$payment_voucher_transaction_types = array(	        
        ST_BANKPAYMENT => $systypes_array[ST_BANKPAYMENT],
        ST_CASH_PAYMENT => $systypes_array[ST_CASH_PAYMENT],
        ST_SUPPAYMENT => $systypes_array[ST_SUPPAYMENT],
        ST_BANKTRANSFER => $systypes_array[ST_BANKTRANSFER]
);

//----------------------------------------------------------------------------------

// Movement Type Linked Fields Array
$inventory_movement_type_linked_fields = array(
    IMLF_NOT_LINKED => _("No Linked List"),
    IMLF_CUSTOMER => _("Customer"),
    IMLF_SUPPLIER => _("Supplier"),
    IMLF_EMPLOYEE => _("Employee"),
    IMLF_VEHICLE => _("Vehicle"), 
    IMLF_ASSET => _("Asset")   
);



$customer_debit_types_array = array(ST_SALESINVOICE, ST_PROJECT_INVOICE, ST_BANKPAYMENT, ST_JOURNAL, ST_CASH_PAYMENT, ST_GL_DEBIT);

$customer_credit_types_array = array(ST_CUSTPAYMENT, ST_CUSTOMER_PAYMENT_RETURN, ST_CUSTCREDIT, ST_PROJECT_CREDIT_NOTE, ST_BANKDEPOSIT, ST_CASH_RECEIPT, ST_GL_CREDIT);



$supplier_credit_types_array = array(ST_SUPPINVOICE, ST_SUPPLIER_TRANSPORT_INVOICES, ST_SUBCONTRACTOR_INVOICE, ST_UTILITY_BILLS, ST_BANKDEPOSIT, ST_CASH_RECEIPT, ST_GL_CREDIT);

$supplier_debit_types_array = array(ST_SUPPAYMENT, ST_SUPPCREDIT, ST_SUBCONTRACTOR_CREDIT_NOTE, ST_UTILITY_BILL_CREDIT_NOTE, ST_BANKPAYMENT, ST_CASH_RECEIPT, ST_GL_DEBIT);



//---------------------------------------------------------------------------------------



$daily_item_types_array = array(
    NSIT_COMMENT => 'Comment',
    NSIT_NON_STOCK_ITEM => 'Non Stock Item',
    NSIT_STOCK_ITEM => 'Stock Item'
);

//----------------------------------------------------------------------------------
// Document approval statuses
//
$document_approval_statuses = array(
    AS_NEW => "New",
    AS_WITH_THE_APPROVER => "With The Approver",
    AS_AWAITING_APPROVAL => "Awaiting Approval",
    AS_APPROVED => "Approved",
    AS_REJECTED => "Rejected",
    AS_ISSUED => "Issued",
    AS_RECEIVED => "Received",
    AS_TRANSFERRED => "Transferred",
    AS_ORDERED => "Ordered",
    AS_COMPLETED => "Completed",
    AS_REOPENED => "Reopened",
    AS_BACK_TO_ORIGINATOR => "Originator",
    AS_CLOSED => _("Closed"),
    AS_PROCESSED => _("Processed"),
    AS_PAID => _("Paid"),
    AS_DELIVERED => _("Delivered")

        
);





//---------------------------------------------------------------------------------------



$dashboard_view_types_array = array(
    DASH_VW_PURCHASE_PURCHASE_ORDERS_CREATED => 'Created',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_UNAPPROVED => 'Unapproved',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_NOT_GRNED => 'Not GRNed',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_PARTIALLY_GRNED => 'Partially GRNed',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_FULLY_GRNED => 'Fully GRNed',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_NOT_INVOICED => 'Not Invoiced',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_PARTIALLY_INVOICED => 'Partially Invoiced',
    DASH_VW_PURCHASE_PURCHASE_ORDERS_FULLY_INVOICED => 'Fully Invoiced',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_CREATED => 'Created',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_UNAPPROVED => 'Unapproved',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_NOT_ORDERED => 'Not Ordered',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_PARTIALLY_ORDERED => 'Partially Ordered',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_FULLY_ORDERED => 'Fully Ordered',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_NOT_ISSUED => 'Not Issued',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_PARTIALLY_ISSUED => 'Partially Issued',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_FULLY_ISSUED => 'Fully Issued',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_PARTIALLY_ISSUED_AND_CLOSED => 'Partially Issued And Closed',
    DASH_VW_PURCHASE_PURCHASE_REQUISITIONS_CLOSED_WITHOUT_ISSUING => 'Closed Without Issuing',
    DASH_VW_PETTY_CASH_I_OWE_YOUS_CREATED => 'IOUs Created', 
    DASH_VW_PETTY_CASH_I_OWE_YOUS_UNAPPROVED => 'IOUs Unapproved', 
    DASH_VW_PETTY_CASH_I_OWE_YOUS_APPROVED => 'IOUs Approved', 
    DASH_VW_PETTY_CASH_I_OWE_YOUS_EXPENSES_ENTERED => 'IOU Expenses Entered', 
    DASH_VW_PETTY_CASH_I_OWE_YOUS_COMPLETED => 'IOUs Completed', 
    DASH_VW_PETTY_CASH_EXPENSES_CREATED => 'Petty Cash Expenses Created', 
    DASH_VW_PETTY_CASH_EXPENSES_UNAPPROVED => 'Petty Cash Expenses Unapproved', 
    DASH_VW_PETTY_CASH_EXPENSES_APPROVED => 'Petty Cash Expenses Approved', 
    DASH_VW_PETTY_CASH_EXPENSES_COMPLETED => 'Petty Cash Expenses Completed', 
    DASH_VW_PETTY_CASH_EXPENSE_BATCHES_CREATED => 'Expense Batches Created',  
    DASH_VW_PETTY_CASH_EXPENSE_BATCHES_DOCUMENTS_CHECKED => 'Expense Batches Checked',  
    DASH_VW_PETTY_CASH_EXPENSE_BATCHES_UNAPPROVED => 'Expense Batches Unapproved',  
    DASH_VW_PETTY_CASH_EXPENSE_BATCHES_APPROVED => 'Expense Batches Approved',  
    DASH_VW_PETTY_CASH_EXPENSE_BATCHES_COMPLETED => 'Expense Batches Completed',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_CREATED => 'Created',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_UNAPPROVED => 'Unapproved',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_NOT_ISSUED => 'Not Issued',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_PARTIALLY_ISSUED => 'Partially Issued',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_FULLY_ISSUED => 'Fully Issued',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_PARTIALLY_ISSUED_AND_CLOSED => 'Partially Issued And Closed',
    DASH_VW_INVENTORY_MATERIAL_REQUISITIONS_CLOSED_WITHOUT_ISSUING => 'Closed Without Issuing',

    

    DASH_VW_SALES_TOP_ITEMS_VALUE => "Items (Value)",
    DASH_VW_SALES_TOP_ITEMS_QTY => "Items (Quantity)",
    DASH_VW_SALES_TOP_ITEMS_PROFIT => "Items - Profitability",
    DASH_VW_SALES_ITEMS_DELIVRY_OUTSTANDING => "Items - Delivery Outstanding",
    DASH_VW_SALES_SALES_ORDERS => "Sales Orders",
    DASH_VW_SALES_SALES_INVOICES => "Sales Invoices",
    DASH_VW_SALES_CUSTOMER_PROFITABILITY => "Customer Profitability",
    DASH_VW_SALES_COLLECTION_OUTSTANDING => "Collection Outstanding",
    DASH_VW_SALES_QUOTATIONS_CREATED => "Sales Quotations",    DASH_VW_SALES_QUOTATIONS_CONVERTED => "Sales Quotations Converted",
    DASH_VW_SALES_REP_SALES_ORDERS => "Sales Rep Sales Orders",
    DASH_VW_SALES_REP_QUOTATIONS_CREATED => "Sales Rep Sales Quotations",
    DASH_VW_SALES_REP_QUOTATIONS_CONVERTED => "Sales Rep Sales Quotations Converted",
    DASH_VW_HR_LEAVES => "Leaves",
    DASH_VW_HR_NO_PAY => "No Pay", 
    DASH_VW_HR_RECRUITMENTS => "Recruitments", 
    DASH_VW_HR_RESIGNATIONS => "Resignations", 
    DASH_VW_HR_EMPLYEE_COUNT_CATEGORY => "Employee Count - Job Category", 
    DASH_VW_HR_EMPLYEE_COUNT_DEPARTMENT => "Employee Count - Departments", 
    DASH_VW_HR_SALARY_COMPONENT => "Salary Component", 
    DASH_VW_HR_EMPLOYEE_ATTENDANCE => "Employee Attendance",
    DASH_VW_PROJECT_NONEDITABLE_ITEM_ISSUES => "Project All Stock Item Issues",
    DASH_VW_PROJECT_EDITABLE_ITEM_ISSUES => "Project All Non-stock Item Issues",
    DASH_VW_PROJECT_ALL_UTILITY_EXPENSES => "Project All Utility Expenses",
    DASH_VW_PROJECT_ALL_PETTY_CASH_EXPENSES => "Project All Petty Cash Expenses",

);


// Movement Types Array
$inventory_movement_types = array(
    ST_INVENTORY_RECEIPT => _("Inventory Receipt"),
    ST_INVENTORY_ISSUE => _("Inventory Issue"),
    ST_INVADJUST => _("Inventory Adjustment"),
    ST_LOCTRANSFER => _("Location Transfer"),
    ST_MATERIAL_REQ  => _("Material Requisition"),
    ST_TRANSFERREQ  => _("Transfer Requisition"),
    ST_STOCK_RESERVATION  => _("Stock Reservation"),
    ST_DAILY_ITEM_ISSUE  => _("Daily Item Issue"),
    ST_DAILY_ITEM_RETURN  => _("Daily Item Return"), 
    ST_PR_ISSUE  => _("PR Issue"),
    ST_PETTY_CASH_ITEM_ISSUE  => _("Petty Cash Item Issue") 
);

$asset_types = array(			
    AT_FIXED_ASSET => _("Fixed Asset"),
    AT_TOOL => _("Tool"),
    AT_VEHICLE => _("Vehicle")
);

// Payroll Approval Statuses
//

$payroll_approval_statuses = array(
    PAS_N => _("New"),
    PAS_U => _("Updated"), 
    PAS_W => _("Awaiting approval"), 
    PAS_A => _("Approved"), 
    PAS_J => _("Rejected"), 
    PAS_C => _("Calculating"), 
    PAS_L => _("Calculated"), 
    PAS_S => _("Calculation Stopped"), 
    PAS_P => _("Processing"), 
    PAS_R => _("Processed"), 
    PAS_T => _("Processing Stopped"), 
    PAS_Y => _("Payroll"), 
    PAS_D => _("Paid"), 
    PAS_G => _("GL")
);

//----------------------------------------------------------------------------------
// Editable Payroll Run Statuses array
//

$editable_payroll_run_status_array = array(PAS_N, PAS_U, PAS_C, PAS_L, PAS_S);

$editable_payroll_run_status_array_str  = array_map(function($rec) { return "'".$rec."'"; }, $editable_payroll_run_status_array);