352 lines
12 KiB
XML
352 lines
12 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
<construct>
|
|
<!-- 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>
|
|
<!-- @todo UNKNOWN - used when recurring payments come in, they must be linked to an invoice number -->
|
|
<!-- DELETED
|
|
<parent_id>
|
|
<type>I4</type>
|
|
</parent_id>
|
|
-->
|
|
<!-- NULL = IMPORTED INVOICE, 0=UNUSED, 2 = CHECKOUT INVOICE,1 = REOCURRING INVOICE -->
|
|
<type>
|
|
<type>L</type>
|
|
</type>
|
|
<!-- Invoice Approved: 1=YES, 0=UNUSED, NULL = NO (Approved invoices can have services provisioned) -->
|
|
<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 -->
|
|
<!-- DELETED
|
|
<suspend_billing>
|
|
<type>L</type>
|
|
</suspend_billing>
|
|
-->
|
|
<!-- 1 = Has this invoice been printed -->
|
|
<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>
|
|
<display>Account</display>
|
|
<type>I8</type>
|
|
</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 -->
|
|
<!-- DELETED
|
|
<custom_affiliate_status>
|
|
<type>L</type>
|
|
</custom_affiliate_status>
|
|
-->
|
|
<!-- 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>
|
|
<!-- Checkout plugin data (has the subscription ID for reoccurring payments) -->
|
|
<checkout_plugin_data>
|
|
<type>C(255)</type>
|
|
<convert>array</convert>
|
|
</checkout_plugin_data>
|
|
<!-- The TAX id applicable for this invoice -->
|
|
<!-- DELETED
|
|
<tax_id>
|
|
<display>Taxes</display>
|
|
<type>I4</type>
|
|
</tax_id>
|
|
-->
|
|
<!-- The amount of TAX this invoice includes -->
|
|
<tax_amt>
|
|
<display>Total Taxes</display>
|
|
<type>F</type>
|
|
</tax_amt>
|
|
<!-- The amount of CREDITS this invoice includes -->
|
|
<credit_amt>
|
|
<display>Total Credits</display>
|
|
<type>F</type>
|
|
</credit_amt>
|
|
<!-- @todo - ? The discounts that were applied to this invoice -->
|
|
<!-- DELETED
|
|
<discount_arr>
|
|
<type>C(255)</type>
|
|
<convert>array</convert>
|
|
</discount_arr>
|
|
-->
|
|
<!-- 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 -->
|
|
<!-- DELETED
|
|
<recur_amt>
|
|
<type>F</type>
|
|
</recur_amt>
|
|
-->
|
|
<!-- Invoice Total Charges (including taxes ??) -->
|
|
<total_amt>
|
|
<display>Amount</display>
|
|
<type>F</type>
|
|
</total_amt>
|
|
<!-- Amount already paid (in site currency) -->
|
|
<billed_amt>
|
|
<display>Amount Paid</display>
|
|
<type>F</type>
|
|
</billed_amt>
|
|
<!-- The currency id that this invoice is due (in site currency) -->
|
|
<billed_currency_id>
|
|
<type>I4</type>
|
|
</billed_currency_id>
|
|
<!-- The amount (in actual_billed_currency_id units) that payment was made in -->
|
|
<actual_billed_amt>
|
|
<type>F</type>
|
|
</actual_billed_amt>
|
|
<!-- The currency that was used to pay the invoice -->
|
|
<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 ?? -->
|
|
<!-- DELETED
|
|
<recur_arr>
|
|
<type>X</type>
|
|
</recur_arr> -->
|
|
<!-- 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 ?? -->
|
|
<!-- DELETED
|
|
<ip>
|
|
<type>C(32)</type>
|
|
</ip> -->
|
|
</field>
|
|
|
|
<!-- Methods for this class, and the fields they have access to, if applicable -->
|
|
<method>
|
|
<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>
|
|
</method>
|
|
|
|
<!-- Method triggers -->
|
|
<trigger></trigger>
|
|
|
|
<!-- Template page display titles -->
|
|
<title>
|
|
<user_view>Invoice</user_view>
|
|
</title>
|
|
|
|
<!-- Template helpers -->
|
|
<tpl>
|
|
<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>
|
|
<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>
|
|
<balance>
|
|
<field>balance</field>
|
|
<type>currency</type>
|
|
</balance>
|
|
<icon>
|
|
<width>60px</width>
|
|
</icon>
|
|
</user_search_show>
|
|
</tpl>
|
|
</construct>
|