<?php

$config = array(
    'mandatory'         => true,
    'description'       => 'Billing functionality.',
    'navButtonLabel'    => /*T*/'Billing'/*/T*/,
    'versions'          => array(
        '2.8.4'         => array(false, false),
        '3.0.0 alpha1'  => array(true, true),
        '3.0.0 beta1'   => array(false, false),
        '3.0.0 beta2'   => array(false, false),
        '3.0.0 beta3'   => array(false, false),
        '3.0.0 beta4'   => array(false, false),
        '3.0.0 PR1'     => array(false, false),
        '3.0.0 PR2'     => array(false, false),
        '3.0.0'         => array(false, false),
        '3.0.1'         => array(false, false),
        '3.0.2'         => array(false, false),
        '3.1.0 beta1'   => array(true, true),
        '3.1.0 beta2'   => array(false, false),
        '3.1.0 beta3'   => array(false, false),
        '3.1.0 beta4'   => array(false, false),
        '3.1.0 RC1'     => array(false, false),
        '3.1.0'         => array(false, false),
        '3.1.1'         => array(true, false),
    ),
    'dependencies'      => array('newedge' => '3.1.1'),
    'hasSchemaFile'     => false,
    'hasInitialData'    => true,
    'hasUninstallSQLScript' => false,
    'hasUninstallPHPScript' => false,
    'order'             => 4,
    'settingTypes'      => array(4),
    'defaultView'       => 'ActiveInvoices',
    'actions'           => array(
        'SetInvoicesPaid_Async'                 =>  'billing_mark_invoice_paid',          
        'GeneratePDFInvoice'                    =>  'billing_view',
        'SetInvoicesUnpaid_Async'               =>  'billing_mark_invoice_paid',
        'SendReceipt_Async'                     =>  'billing_send_invoices',
        'SendInvoices_Async'                    =>  'billing_send_invoices',
        'SendOverdueInvoices_Async'             =>  'billing_send_invoices',
        'UnArchiveInvoices_Async'               =>  'billing_unarchive_invoices',
        'ArchiveInvoice_Async'                  =>  'billing_archive_invoice',
        'DeleteInvoices_Async'                  =>  'billing_create',
        'ProcessInvoices_Async'                 =>  'billing_process_invoices',
        'RefundInvoices_Async'                  =>  'billing_refund_invoices',
        'VoidInvoices_Async'                    =>  'billing_void_invoices',
        'AddInvoiceEntry'                       =>  '', // permission handled inside the action
        'UpdateInvoiceEntry'                    =>  'billing_create',
        'DeleteRecurringCharge'                 =>  'billing_delete_recurring',
        'UnTagIncludeInNextInvoice'             =>  'billing_delete_recurring',
        'SetPackageInActive'                    =>  'billing_delete_recurring',
        'DeleteInvoiceEntryFromInvoice'         =>  'billing_create',
        'AddWorkToInvoice'                      =>  'billing_create',
        'DeleteInvoiceEntry'                    =>  'billing_create',
        'CreateNewInvoice'                      =>  'billing_create',
        'MoveEntryToInvoice'                    =>  'billing_create',
        'PayInvoice'                            =>  'billing_view',
        'PayInvoice_Async'                      =>  'billing_view',
        'AddBillingType'                        =>  'billing_edit_billing_types',
        'UpdateBillingType'                     =>  'billing_edit_billing_types',
        'DeleteBillingType'                     =>  'billing_edit_billing_types',
        'GatewayCallback'                       =>  '',
    ),
    'views'             => array(
    // view                                     => array(menuitem)
        'ActiveInvoices'                        =>  'billing_view',
        'ShowEntries_Async'                     =>  'billing_view',
        'InvoiceButtons_Async'                  =>  'billing_view',
        'ReturnInvoiceAmountHTML_Async'         =>  'billing_view',
        'ReturnInvoiceStatusHTML_Async'         =>  'billing_view',
        'AddCheckToInvoiceReturnHTML_Async'     =>  'billing_mark_invoice_paid',
        'FilterInvoices_Async'                  =>  'billing_view',
        'ViewArchivedInvoices'                  =>  'billing_archived_invoices',
        'RecurringOverview'                     =>  'billing_recurring_overview',
        'ViewUnInvoicedWork'                    =>  'billing_uninvoiced_work',
        'CreateInvoiceEntry'                    =>  'billing_create',
        'ViewInvoiceEntryDetail'                =>  'billing_view',
        'EditRecurringInvoice'                  =>  'billing_edit_recurring',
        'ShowBillingTypes'                      =>  'billing_show_billing_types',
        'Snapshot_Uninvoiced'                   =>  'billing_uninvoiced_work',
        'Snapshot_Invoices'                     =>  'billing_view',
        'SendInvoiceAsync_Snapshot'             =>  'billing_send_invoices',
        'SendOverdueInvoiceAsync_Snapshot'      =>  'billing_send_invoices',
        'MarkInvoicePaidAsync_Snapshot'         =>  'billing_mark_invoice_paid',
        'DeleteInvoicesAsync_Snapshot'          =>  'billing_create',
        'DeleteUninvoicedWorkAsync_Snapshot'    =>  'billing_create',
        'Billing_ViewEventLog'                  =>  'billing_view_eventlog',
    ),
    'hooks'         => array(
        'Menu'                                  => 'Billing_menu',
        'Settings'                              => array(   'Invoicing_Settings'  => array(
                                                                'internalName'      => 'invoicing',
                                                                'tabLabel'          => /*T*/'Invoicing'/*/T*/,
                                                                'order'             => 5,
                                                                'intSettingsType'   => 4
                                                                ),
                                                        ),
        'Snapshots'                             => array(   'Snapshot_Uninvoiced'   => array(
                                                                                        'tabLabel'  => /*T*/'Uninvoiced Work'/*/T*/
                                                                                        ),
                                                            'Snapshot_Invoices'     => array(
                                                                                        'tabLabel'  => /*T*/'Invoices'/*/T*/
                                                                                        ),
                                                        ),
        'EventLogging'                          => array('billing'  => array(   'label'     => 'Billing',
                                                                                'classes'   => array('InvoiceEntry_EventLog', 'Invoice_EventLog', 'RecurringEntry_EventLog')
                                                                            )
                                                        ),
    ),
);

?>
