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>
|
|
|
|
<parent>parent_id</parent>
|
|
|
|
<billing>billing_status</billing>
|
|
|
|
<process>process_status</process>
|
|
|
|
<suspend>suspend_billing</suspend>
|
|
|
|
<refund>refund_status</refund>
|
|
|
|
<account>account_id</account>
|
|
|
|
<affiliate>affiliate_id</affiliate>
|
|
|
|
<campaign>campaign_id</campaign>
|
|
|
|
<reseller>reseller_id</reseller>
|
|
|
|
<amount>total_amt</amount>
|
|
|
|
<due_date>due_date</due_date>
|
|
|
|
<checkout>checkout_plugin_id</checkout>
|
|
|
|
<tax>tax_id</tax>
|
|
|
|
<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
|
|
|
<!-- @todo UNKNOWN - used when recurring payments come in, they must be linked to an invoice number -->
|
|
|
|
<!-- DELETED
|
|
|
|
<parent_id>
|
2009-08-03 04:10:16 +00:00
|
|
|
<type>I4</type>
|
|
|
|
</parent_id>
|
2010-11-29 22:41:08 +00:00
|
|
|
-->
|
|
|
|
<!-- NULL = IMPORTED INVOICE, 0=UNUSED, 2 = CHECKOUT INVOICE,1 = REOCURRING INVOICE -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<type>
|
|
|
|
<type>L</type>
|
|
|
|
</type>
|
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>
|
|
|
|
<!-- Invoice has been refunded when STATUS = 1 -->
|
|
|
|
<refund_status>
|
|
|
|
<display>Refund Status</display>
|
|
|
|
<type>L</type>
|
|
|
|
</refund_status>
|
|
|
|
<!-- Suspend billing of reocurring invoices, where this invoice is the 1st/parent invoice -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
2009-08-03 04:10:16 +00:00
|
|
|
<suspend_billing>
|
|
|
|
<type>L</type>
|
|
|
|
</suspend_billing>
|
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 compaign that resulted in this revenue -->
|
|
|
|
<campaign_id>
|
|
|
|
<type>I4</type>
|
|
|
|
</campaign_id>
|
|
|
|
<!-- @todo UNKNOWN -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
2009-08-03 04:10:16 +00:00
|
|
|
<custom_affiliate_status>
|
|
|
|
<type>L</type>
|
|
|
|
</custom_affiliate_status>
|
2010-11-29 22:41:08 +00:00
|
|
|
-->
|
2009-08-03 04:10:16 +00:00
|
|
|
<!-- 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 TAX id applicable for this invoice -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
|
|
|
<tax_id>
|
2009-08-03 04:10:16 +00:00
|
|
|
<display>Taxes</display>
|
|
|
|
<type>I4</type>
|
|
|
|
</tax_id>
|
2010-11-29 22:41:08 +00:00
|
|
|
-->
|
2009-08-03 04:10:16 +00:00
|
|
|
<!-- 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
|
|
|
<!-- @todo - ? The discounts that were applied to this invoice -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
2009-08-03 04:10:16 +00:00
|
|
|
<discount_arr>
|
|
|
|
<type>C(255)</type>
|
|
|
|
<convert>array</convert>
|
|
|
|
</discount_arr>
|
2010-11-29 22:41:08 +00:00
|
|
|
-->
|
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>
|
|
|
|
<!-- @todo?? The amount of re-ocurring items on this invoice -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
2009-08-03 04:10:16 +00:00
|
|
|
<recur_amt>
|
|
|
|
<type>F</type>
|
|
|
|
</recur_amt>
|
2010-11-29 22:41:08 +00:00
|
|
|
-->
|
2009-08-03 04:10:16 +00:00
|
|
|
<!-- 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>
|
|
|
|
<!-- @todo ?? -->
|
|
|
|
<notice_count>
|
|
|
|
<type>I4</type>
|
|
|
|
</notice_count>
|
|
|
|
<!-- @todo ?? -->
|
|
|
|
<notice_max>
|
|
|
|
<type>I4</type>
|
|
|
|
</notice_max>
|
|
|
|
<!-- @todo ?? -->
|
|
|
|
<notice_next_date>
|
|
|
|
<type>I8</type>
|
|
|
|
<convert>date-time</convert>
|
|
|
|
</notice_next_date>
|
|
|
|
<!-- @todo ?? -->
|
|
|
|
<grace_period>
|
|
|
|
<type>I4</type>
|
|
|
|
</grace_period>
|
|
|
|
<!-- The date this invoice is due -->
|
|
|
|
<due_date>
|
|
|
|
<display>Date Due</display>
|
|
|
|
<type>I8</type>
|
|
|
|
<convert>date-time</convert>
|
|
|
|
</due_date>
|
|
|
|
<!-- @todo ?? -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
2009-08-03 04:10:16 +00:00
|
|
|
<recur_arr>
|
|
|
|
<type>X</type>
|
2010-11-29 22:41:08 +00:00
|
|
|
</recur_arr> -->
|
2009-08-03 04:10:16 +00:00
|
|
|
<!-- 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>
|
|
|
|
<!-- @todo ?? -->
|
|
|
|
<net_term_date_last>
|
|
|
|
<type>I8</type>
|
|
|
|
</net_term_date_last>
|
|
|
|
<!-- @todo ?? -->
|
|
|
|
<net_term_intervals>
|
|
|
|
<type>I4</type>
|
|
|
|
</net_term_intervals>
|
|
|
|
<!-- @todo ?? -->
|
2010-11-29 22:41:08 +00:00
|
|
|
<!-- DELETED
|
2009-08-03 04:10:16 +00:00
|
|
|
<ip>
|
|
|
|
<type>C(32)</type>
|
2010-11-29 22:41:08 +00:00
|
|
|
</ip> -->
|
2009-08-03 04:10:16 +00:00
|
|
|
</field>
|
|
|
|
|
|
|
|
<!-- Methods for this class, and the fields they have access to, if applicable -->
|
|
|
|
<method>
|
2010-11-29 22:41:08 +00:00
|
|
|
<add>id,type,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,checkout_plugin_data,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,status</add>
|
|
|
|
<update>id,date_last,type,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,checkout_plugin_data,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</update>
|
|
|
|
<delete>id</delete>
|
|
|
|
<view>id,date_orig,date_last,type,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,checkout_plugin_data,tax_amt,discount_amt,total_amt,billed_amt,credit_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</view>
|
|
|
|
<search>id,date_orig,date_last,type,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,checkout_plugin_data,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</search>
|
|
|
|
<export_excel>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</export_excel>
|
|
|
|
<export_pdf>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</export_pdf>
|
|
|
|
<export_xml>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</export_xml>
|
|
|
|
<export_csv>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</export_csv>
|
|
|
|
<export_tab>id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,affiliate_id,campaign_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,actual_billed_amt,actual_billed_currency_id,notice_count,notice_max,notice_next_date,grace_period,due_date,net_term_date_last,net_term_id,net_term_intervals</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>
|