2008-11-26 22:50:40 +00:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
|
|
<construct>
|
2009-08-03 04:10:16 +00:00
|
|
|
<!-- Module name -->
|
|
|
|
<module>invoice</module>
|
|
|
|
<!-- Module supporting database table -->
|
|
|
|
<table>invoice</table>
|
|
|
|
<!-- Module dependancy(s) (module wont install if these modules are not yet installed) -->
|
|
|
|
<dependancy></dependancy>
|
|
|
|
<!-- DB cache in seconds -->
|
|
|
|
<cache>0</cache>
|
|
|
|
<!-- Default order_by field for SQL queries -->
|
|
|
|
<order_by>date_orig</order_by>
|
|
|
|
<!-- Default SQL limit for SQL queries -->
|
|
|
|
<limit>25</limit>
|
|
|
|
<!-- Schema version (used to determine if the schema has change during upgrades) -->
|
|
|
|
<version>1</version>
|
|
|
|
|
|
|
|
<!-- Database indexes -->
|
|
|
|
<index>
|
|
|
|
<orig>date_orig</orig>
|
|
|
|
<last>date_last</last>
|
|
|
|
<billing>billing_status</billing>
|
|
|
|
<process>process_status</process>
|
|
|
|
<account>account_id</account>
|
|
|
|
<reseller>reseller_id</reseller>
|
|
|
|
<amount>total_amt</amount>
|
|
|
|
<due_date>due_date</due_date>
|
|
|
|
<checkout>checkout_plugin_id</checkout>
|
|
|
|
<net_term>net_term_id</net_term>
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<!-- Database fields -->
|
|
|
|
<field>
|
|
|
|
<!-- Record ID -->
|
|
|
|
<id>
|
|
|
|
<display>Invoice</display>
|
|
|
|
<index>1</index>
|
|
|
|
<type>I4</type>
|
|
|
|
<unique>1</unique>
|
|
|
|
</id>
|
|
|
|
<!-- Site ID -->
|
|
|
|
<site_id>
|
|
|
|
<index>1</index>
|
|
|
|
<type>I4</type>
|
|
|
|
</site_id>
|
|
|
|
<!-- Date record created -->
|
|
|
|
<date_orig>
|
|
|
|
<convert>date-now</convert>
|
|
|
|
<display>Invoice Date</display>
|
|
|
|
<type>I8</type>
|
|
|
|
</date_orig>
|
|
|
|
<!-- Date record updated -->
|
|
|
|
<date_last>
|
|
|
|
<convert>date-now</convert>
|
|
|
|
<display>Date Updated</display>
|
|
|
|
<type>I8</type>
|
|
|
|
</date_last>
|
|
|
|
<!-- Record active (BOOL)-->
|
|
|
|
<status>
|
|
|
|
<display>Active</display>
|
|
|
|
<type>L</type>
|
|
|
|
</status>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- Invoice Approved: 1=YES, 0=UNUSED, NULL = NO (Approved invoices can have services provisioned) -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<process_status>
|
|
|
|
<type>L</type>
|
|
|
|
</process_status>
|
|
|
|
<!-- Invoice is PAID when Billing STATUS = 1 -->
|
|
|
|
<billing_status>
|
|
|
|
<display>Invoice Status</display>
|
|
|
|
<type>L</type>
|
|
|
|
</billing_status>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- 1 = Has this invoice been printed -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<print_status>
|
|
|
|
<type>L</type>
|
|
|
|
</print_status>
|
|
|
|
<!-- The account this invoice belongs to -->
|
|
|
|
<account_id>
|
|
|
|
<asso_table>account</asso_table>
|
|
|
|
<asso_field>first_name,last_name</asso_field>
|
2010-11-29 22:41:08 +00:00
|
|
|
<display>Account</display>
|
|
|
|
<type>I8</type>
|
2009-08-03 04:10:16 +00:00
|
|
|
</account_id>
|
|
|
|
<!-- @todo UNKNOWN -->
|
|
|
|
<account_billing_id>
|
|
|
|
<type>I4</type>
|
|
|
|
</account_billing_id>
|
|
|
|
<!-- The afflicate who should be credited for this invoice revenue -->
|
|
|
|
<affiliate_id>
|
|
|
|
<type>C(32)</type>
|
|
|
|
</affiliate_id>
|
|
|
|
<!-- The reseller who should be credited for this invoice revenue -->
|
|
|
|
<reseller_id>
|
|
|
|
<type>C(32)</type>
|
|
|
|
</reseller_id>
|
|
|
|
<!-- Checkout plugin for this invoice -->
|
|
|
|
<checkout_plugin_id>
|
|
|
|
<type>I4</type>
|
|
|
|
</checkout_plugin_id>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- Checkout plugin data (has the subscription ID for reoccurring payments) -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<checkout_plugin_data>
|
|
|
|
<type>C(255)</type>
|
|
|
|
<convert>array</convert>
|
|
|
|
</checkout_plugin_data>
|
|
|
|
<!-- The amount of TAX this invoice includes -->
|
|
|
|
<tax_amt>
|
|
|
|
<display>Total Taxes</display>
|
|
|
|
<type>F</type>
|
|
|
|
</tax_amt>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- The amount of CREDITS this invoice includes -->
|
|
|
|
<credit_amt>
|
|
|
|
<display>Total Credits</display>
|
|
|
|
<type>F</type>
|
|
|
|
</credit_amt>
|
2009-08-03 04:10:16 +00:00
|
|
|
<!-- The amount of DISCOUNT this invoice includes -->
|
|
|
|
<discount_amt>
|
|
|
|
<display>Total Discounts</display>
|
|
|
|
<type>F</type>
|
|
|
|
</discount_amt>
|
|
|
|
<!-- Invoice Total Charges (including taxes ??) -->
|
|
|
|
<total_amt>
|
|
|
|
<display>Amount</display>
|
|
|
|
<type>F</type>
|
|
|
|
</total_amt>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- Amount already paid (in site currency) -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<billed_amt>
|
|
|
|
<display>Amount Paid</display>
|
|
|
|
<type>F</type>
|
|
|
|
</billed_amt>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- The currency id that this invoice is due (in site currency) -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<billed_currency_id>
|
|
|
|
<type>I4</type>
|
|
|
|
</billed_currency_id>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- The amount (in actual_billed_currency_id units) that payment was made in -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<actual_billed_amt>
|
|
|
|
<type>F</type>
|
|
|
|
</actual_billed_amt>
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- The currency that was used to pay the invoice -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<actual_billed_currency_id>
|
|
|
|
<type>I4</type>
|
|
|
|
</actual_billed_currency_id>
|
|
|
|
<!-- The date this invoice is due -->
|
|
|
|
<due_date>
|
|
|
|
<display>Date Due</display>
|
|
|
|
<type>I8</type>
|
|
|
|
<convert>date-time</convert>
|
|
|
|
</due_date>
|
|
|
|
<!-- Admin notes attached to the invoice -->
|
|
|
|
<notes>
|
|
|
|
<type>X</type>
|
|
|
|
</notes>
|
|
|
|
<!-- Invoice terms that govern when this invoice is overdue, and when notices should go out -->
|
|
|
|
<net_term_id>
|
|
|
|
<type>L</type>
|
|
|
|
</net_term_id>
|
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Methods for this class, and the fields they have access to, if applicable -->
|
|
|
|
<method>
|
2011-08-16 02:27:19 +00:00
|
|
|
<add>id,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,status</add>
|
|
|
|
<update>id,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</update>
|
2010-11-29 22:41:08 +00:00
|
|
|
<delete>id</delete>
|
2011-08-16 02:27:19 +00:00
|
|
|
<view>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,credit_amt,billed_currency_id,due_date,net_term_id</view>
|
|
|
|
<search>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</search>
|
|
|
|
<export_excel>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</export_excel>
|
|
|
|
<export_pdf>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</export_pdf>
|
|
|
|
<export_xml>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</export_xml>
|
|
|
|
<export_csv>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</export_csv>
|
|
|
|
<export_tab>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id</export_tab>
|
2009-08-03 04:10:16 +00:00
|
|
|
</method>
|
|
|
|
|
|
|
|
<!-- Method triggers -->
|
|
|
|
<trigger></trigger>
|
|
|
|
|
|
|
|
<!-- Template page display titles -->
|
|
|
|
<title>
|
|
|
|
<user_view>Invoice</user_view>
|
|
|
|
</title>
|
|
|
|
|
|
|
|
<!-- Template helpers -->
|
|
|
|
<tpl>
|
2010-11-29 22:41:08 +00:00
|
|
|
<invoicesoon>
|
|
|
|
<checkbox>
|
|
|
|
<field>id</field>
|
|
|
|
<type>checkbox</type>
|
|
|
|
<width>25px</width>
|
|
|
|
</checkbox>
|
|
|
|
<account_id>
|
|
|
|
<field>account_id</field>
|
|
|
|
</account_id>
|
|
|
|
<service_id>
|
|
|
|
<translate>service_id</translate>
|
|
|
|
</service_id>
|
|
|
|
<next_invoice_date>
|
|
|
|
<field>invoice_date</field>
|
|
|
|
<translate>next_invoice_date</translate>
|
|
|
|
</next_invoice_date>
|
|
|
|
<price>
|
|
|
|
<field>price</field>
|
|
|
|
<type>currency</type>
|
|
|
|
</price>
|
|
|
|
<icon>
|
|
|
|
<width>120px</width>
|
|
|
|
</icon>
|
|
|
|
</invoicesoon>
|
2009-08-03 04:10:16 +00:00
|
|
|
<search_show>
|
|
|
|
<checkbox>
|
|
|
|
<field>id</field>
|
|
|
|
<type>checkbox</type>
|
|
|
|
<width>25px</width>
|
|
|
|
</checkbox>
|
|
|
|
<id>
|
|
|
|
<field>id</field>
|
|
|
|
</id>
|
|
|
|
<account_id>
|
|
|
|
<field>account_id</field>
|
|
|
|
</account_id>
|
|
|
|
<date_orig>
|
|
|
|
<field>date_orig</field>
|
|
|
|
<type>date</type>
|
|
|
|
</date_orig>
|
|
|
|
<due_date>
|
|
|
|
<field>due_date</field>
|
|
|
|
<type>date</type>
|
|
|
|
</due_date>
|
|
|
|
<total_amt>
|
|
|
|
<field>total_amt</field>
|
|
|
|
<type>currency</type>
|
|
|
|
</total_amt>
|
|
|
|
<icon>
|
|
|
|
<width>120px</width>
|
|
|
|
</icon>
|
|
|
|
</search_show>
|
|
|
|
<user_search_show>
|
|
|
|
<checkbox>
|
|
|
|
<field>id</field>
|
|
|
|
<type>checkbox</type>
|
|
|
|
<width>25px</width>
|
|
|
|
</checkbox>
|
|
|
|
<id>
|
|
|
|
<field>id</field>
|
|
|
|
</id>
|
|
|
|
<date_orig>
|
|
|
|
<field>date_orig</field>
|
|
|
|
<type>date</type>
|
|
|
|
</date_orig>
|
|
|
|
<total_amt>
|
|
|
|
<field>total_amt</field>
|
|
|
|
<type>currency</type>
|
|
|
|
</total_amt>
|
2010-11-29 22:41:08 +00:00
|
|
|
<balance>
|
|
|
|
<field>balance</field>
|
|
|
|
<type>currency</type>
|
|
|
|
</balance>
|
2009-08-03 04:10:16 +00:00
|
|
|
<icon>
|
|
|
|
<width>60px</width>
|
|
|
|
</icon>
|
|
|
|
</user_search_show>
|
|
|
|
</tpl>
|
2008-11-26 22:50:40 +00:00
|
|
|
</construct>
|