MidCOM wrapped base class, keep logic here

package org.openpsa.invoices

 Methods

_on_creating ()

_on_deleting ()

Deletes all invoice_hours related to the invoice

_on_updating ()

_recalculate_invoice_items (array $tasks, $skip_invoice_update)

Helper function to create & recalculate existing invoice_items by tasks

Parameters

$tasks

arrayarray containing the task id's to recalculate for - if empty all tasks will be recalculated

$skip_invoice_update

generate_invoice_number ()

generate_invoicing_task ($invoicer)

Generate "Send invoice" task

Parameters

$invoicer

get_billing_data ()

helper function to get the billing data for the invoice

get_by_number ($number)

Static

Parameters

$number

get_canceled_invoice ()

returns the invoice that got canceled through this invoice, if any

Returns

\org_openpsa_invoices_invoice_dbafalse

get_class_magic_default_privileges ()

By default all authenticated users should be able to do whatever they wish with relatedto objects, later we can add restrictions on object level as necessary.

get_customer ()

get_default (string $attribute)

function to get the default value for invoice

Parameters

$attribute

string

get_icon ()

get_invoice_items ()

Helper function to get corresponding invoice_items indexed by GUID

get_label ()

Human-readable label for cases like Asgard navigation

get_label_property ()

Label property (for Asgard chooser and the likes)

get_status ()

is_cancelable ()

an invoice is cancelable if it is no cancelation invoice itself and got no related cancelation invoice

Returns

boolean

_get_billing_data (string $dba_class, mixed $contact_id)

helper function to get the billing data for given contact if any

Parameters

$dba_class

string

$contact_id

mixed

_pre_write_operations ()

_probe_invoice_item_for_task ($task_id)

Helper function to get invoice_item for the passed task id, if there is no item it will return a new created one

Parameters

$task_id

 Properties

 

mixed $__mgdschema_class_name__

 

mixed $__midcom_class_name__

 

mixed $autodelete_dependents

 

mixed $_billing_data