Changes to AgileBill
This commit is contained in:
@@ -1,71 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AgileBill - Open Billing Software
|
||||
*
|
||||
* This body of work is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Open AgileBill License
|
||||
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* Originally authored by Tony Landis, AgileBill LLC
|
||||
*
|
||||
* Recent modifications by Deon George
|
||||
*
|
||||
* @author Deon George <deonATleenooksDOTnet>
|
||||
* @copyright 2009 Deon George
|
||||
* @link http://osb.leenooks.net
|
||||
*
|
||||
* @link http://www.agileco.com/
|
||||
* @copyright 2004-2008 Agileco, LLC.
|
||||
* @license http://www.agileco.com/agilebill/license1-4.txt
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @package AgileBill
|
||||
* @version 1.4.93
|
||||
* @subpackage Modules:Invoice
|
||||
*/
|
||||
|
||||
class setup_invoice
|
||||
{
|
||||
function setup_invoice()
|
||||
{
|
||||
$this->module = "setup_invoice";
|
||||
$this->xml_construct = PATH_MODULES . $this->module . "/" . $this->module . "_construct.xml";
|
||||
$C_xml = new CORE_xml;
|
||||
$construct = $C_xml->xml_to_array($this->xml_construct);
|
||||
$this->method = $construct["construct"]["method"];
|
||||
$this->trigger = $construct["construct"]["trigger"];
|
||||
$this->field = $construct["construct"]["field"];
|
||||
$this->table = $construct["construct"]["table"];
|
||||
$this->module = $construct["construct"]["module"];
|
||||
$this->cache = $construct["construct"]["cache"];
|
||||
$this->order_by = $construct["construct"]["order_by"];
|
||||
$this->limit = $construct["construct"]["limit"];
|
||||
}
|
||||
|
||||
function search($VAR)
|
||||
{
|
||||
$type = "search";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function search_show($VAR)
|
||||
{
|
||||
$type = "search";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search_show($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function view($VAR)
|
||||
{
|
||||
$type = "view";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->view($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function update($VAR)
|
||||
{
|
||||
$type = "update";
|
||||
$this->method["$type"] = explode(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$rs = $db->update($VAR, $this, $type);
|
||||
}
|
||||
/**
|
||||
* The main AgileBill Invoice Setup Class
|
||||
*
|
||||
* @package AgileBill
|
||||
* @subpackage Modules:Invoice
|
||||
*/
|
||||
class setup_invoice extends OSB_module {
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@@ -1,84 +1,151 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<construct>
|
||||
<module>setup_invoice</module>
|
||||
<table>setup_invoice</table>
|
||||
<dependancy/>
|
||||
<cache>0</cache>
|
||||
<order_by>site_id</order_by>
|
||||
<limit>10</limit>
|
||||
<field>
|
||||
<id>
|
||||
<type>I4</type>
|
||||
<unique>1</unique>
|
||||
<index>1</index>
|
||||
</id>
|
||||
<site_id>
|
||||
<type>I4</type>
|
||||
<unique>1</unique>
|
||||
<index>1</index>
|
||||
</site_id>
|
||||
<bill_to_company>
|
||||
<type>L</type>
|
||||
<construct>
|
||||
<!-- Module name -->
|
||||
<module>setup_invoice</module>
|
||||
<!-- Module supporting database table -->
|
||||
<table>setup_invoice</table>
|
||||
<!-- Module dependancy(s) (module wont install if these modules are not yet installed) -->
|
||||
<dependancy></dependancy>
|
||||
<!-- DB cache in seconds -->
|
||||
<cache>15</cache>
|
||||
<!-- Default order_by field for SQL queries -->
|
||||
<order_by>site_id</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>
|
||||
</index>
|
||||
|
||||
<!-- Database fields -->
|
||||
<field>
|
||||
<!-- Record ID -->
|
||||
<id>
|
||||
<index>1</index>
|
||||
<type>I4</type>
|
||||
<unique>1</unique>
|
||||
</id>
|
||||
<!-- Site ID -->
|
||||
<site_id>
|
||||
<index>1</index>
|
||||
<type>I4</type>
|
||||
<unique>1</unique>
|
||||
</site_id>
|
||||
<bill_to_company>
|
||||
<type>L</type>
|
||||
<default>1</default>
|
||||
</bill_to_company>
|
||||
<invoice_currency>
|
||||
<type>C(8)</type>
|
||||
</invoice_currency>
|
||||
<invoice_decimals>
|
||||
<type>I4</type>
|
||||
<default>5</default>
|
||||
</invoice_decimals>
|
||||
<items_summary_max>
|
||||
<type>I4</type>
|
||||
<display>Bill to company name</display>
|
||||
<description>This field controls whether generated invoices should be addressed to the company name, or to the account holders name</description>
|
||||
</bill_to_company>
|
||||
<invoice_currency>
|
||||
<type>C(8)</type>
|
||||
<display>Currency Symbol to use on invoice</display>
|
||||
<description>When rendering invoices, this symbol will be used to show the currency eg: $</description>
|
||||
</invoice_currency>
|
||||
<invoice_decimals>
|
||||
<type>I4</type>
|
||||
<default>2</default>
|
||||
<display>Number of decimals to use for money amounts</display>
|
||||
</invoice_decimals>
|
||||
<items_summary_max>
|
||||
<type>I4</type>
|
||||
<default>16</default>
|
||||
</items_summary_max>
|
||||
<news>
|
||||
<type>X</type>
|
||||
<default>default</default>
|
||||
</news>
|
||||
<page_type>
|
||||
<type>I4</type>
|
||||
<default>1</default>
|
||||
</page_type>
|
||||
<invoice_delivery>
|
||||
<type>I4</type>
|
||||
</invoice_delivery>
|
||||
<invoice_show_itemized>
|
||||
<type>L</type>
|
||||
<default>1</default>
|
||||
</invoice_show_itemized>
|
||||
<invoice_show_service_dates>
|
||||
<type>L</type>
|
||||
<default>0</default>
|
||||
</invoice_show_service_dates>
|
||||
<invoice_grace>
|
||||
<type>I4</type>
|
||||
</invoice_grace>
|
||||
<invoice_advance_gen>
|
||||
<type>I4</type>
|
||||
</invoice_advance_gen>
|
||||
<invoice_terms>
|
||||
<type>I4</type>
|
||||
</invoice_terms>
|
||||
<display>Maximum number of summary line items to use on the summary page</display>
|
||||
</items_summary_max>
|
||||
<news>
|
||||
<type>X</type>
|
||||
<default></default>
|
||||
<display>News to show on invoices</display>
|
||||
<description>The news will show on the summary page</description>
|
||||
</news>
|
||||
<page_type>
|
||||
<type>C(8)</type>
|
||||
<default>blank</default>
|
||||
<display>PDF Template for invoices</display>
|
||||
<description>This is only applicable for FPDI templates</description>
|
||||
</page_type>
|
||||
<invoice_delivery>
|
||||
<type>I4</type>
|
||||
<display>Invoice delivery method</display>
|
||||
</invoice_delivery>
|
||||
<invoice_show_itemized>
|
||||
<type>L</type>
|
||||
<default>1</default>
|
||||
<display>Show itemised items on the invoice</display>
|
||||
</invoice_show_itemized>
|
||||
<invoice_show_service_dates>
|
||||
<type>L</type>
|
||||
<default>1</default>
|
||||
<display>Show date ranges with items</display>
|
||||
<description>When showing itemised items, show the date ranges that the items are valid for</description>
|
||||
</invoice_show_service_dates>
|
||||
<!-- XX Number of days this invoice can remain unpaid before nagging (Can be override by account) Merge with setup:grace_period -->
|
||||
<invoice_grace>
|
||||
<type>I4</type>
|
||||
</invoice_grace>
|
||||
<invoice_advance_gen>
|
||||
<type>I4</type>
|
||||
<display>Generate invoices days in advance</display>
|
||||
<description>Generate invoices this many days before the due date of the service item</description>
|
||||
</invoice_advance_gen>
|
||||
<!-- XX Default payment terms of an invoice -->
|
||||
<invoice_terms>
|
||||
<type>I4</type>
|
||||
</invoice_terms>
|
||||
<invoice_pdf_plugin>
|
||||
<type>C(16)</type>
|
||||
<default>overview</default>
|
||||
<display>PDF Plugin for invoices</display>
|
||||
<description>PDF Plugin to use when generating PDF invoices</description>
|
||||
</invoice_pdf_plugin>
|
||||
<!-- @deprecated Contact us URL to show on invoices, now use SSL_URL or NON-SSL_URL -->
|
||||
<contact_us_url>
|
||||
<type>C(64)</type>
|
||||
</contact_us_url>
|
||||
<!-- @deprecated Contact us phone to show on invoices, now use Contact Phone -->
|
||||
<contact_us_phone>
|
||||
<type>C(64)</type>
|
||||
</contact_us_phone>
|
||||
<advance_notice>
|
||||
<type>I4</type>
|
||||
<display>Upcoming invoices days in advance</display>
|
||||
<description>Show upcoming invoices this many days before they would be generated</description>
|
||||
</advance_notice>
|
||||
</field>
|
||||
<method>
|
||||
<update>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,contact_us_url,contact_us_phone,advance_notice</update>
|
||||
<view>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,contact_us_url,contact_us_phone,advance_notice</view>
|
||||
<search>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,contact_us_url,contact_us_phone,advance_notice</search>
|
||||
<search_show>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,contact_us_url,contact_us_phone,advance_notice</search_show>
|
||||
</method>
|
||||
<trigger>0</trigger>
|
||||
</field>
|
||||
|
||||
<!-- Methods for this class, and the fields they have access to, if applicable -->
|
||||
<method>
|
||||
<update>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,advance_notice,invoice_advance_gen</update>
|
||||
<view>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,advance_notice,invoice_advance_gen</view>
|
||||
<search>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,advance_notice</search>
|
||||
<search_show>id,bill_to_company,invoice_currency,invoice_decimals,items_summary_max,news,page_type,invoice_show_itemized,invoice_show_service_dates,invoice_delivery,invoice_grace,invoice_advance_gen,invoice_terms,invoice_pdf_plugin,advance_notice</search_show>
|
||||
</method>
|
||||
|
||||
<!-- Method triggers -->
|
||||
<trigger></trigger>
|
||||
|
||||
<!-- Template page display titles -->
|
||||
<title>
|
||||
<view>Setup Invoice</view>
|
||||
</title>
|
||||
|
||||
<!-- Template helpers -->
|
||||
<tpl>
|
||||
<search_show>
|
||||
<checkbox>
|
||||
<field>id</field>
|
||||
<type>checkbox</type>
|
||||
<width>25px</width>
|
||||
</checkbox>
|
||||
<id>
|
||||
<field>id</field>
|
||||
</id>
|
||||
<news>
|
||||
<field>news</field>
|
||||
<width>70%</width>
|
||||
</news>
|
||||
</search_show>
|
||||
</tpl>
|
||||
</construct>
|
||||
|
@@ -1,26 +1,45 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<install>
|
||||
<!-- Tree Menu Module Properties -->
|
||||
<module_properties>
|
||||
<name>setup_invoice</name>
|
||||
<parent>setup</parent>
|
||||
<notes><![CDATA[Control the invoice setup]]></notes>
|
||||
<!-- MODULE Dependancy, this module wont be installed if the dependant modules dont exist -->
|
||||
<dependancy></dependancy>
|
||||
<!-- Translated display to use on the tree -->
|
||||
<display>Setup Invoice</display>
|
||||
<!-- Display a module in the menu tree -->
|
||||
<menu_display>1</menu_display>
|
||||
<!-- MODULE Name -->
|
||||
<name>setup_invoice</name>
|
||||
<!-- MODULE Notes, these notes show up in the modules table, as a description of the module -->
|
||||
<notes><![CDATA[Control the invoice setup]]></notes>
|
||||
<!-- MODULE Parent, the parent node in the tree -->
|
||||
<parent>setup</parent>
|
||||
<!-- SUB Modules to install with this one -->
|
||||
<sub_modules></sub_modules>
|
||||
<!-- MODULE Type (core|base), core modules cannot be deleted, unrecognised types are ignored. -->
|
||||
<type></type>
|
||||
</module_properties>
|
||||
<sql_inserts>
|
||||
<module_method>
|
||||
<search>
|
||||
<name>search</name>
|
||||
</search>
|
||||
<view>
|
||||
<name>view</name>
|
||||
<page>core:search&module=%%&_escape=1&_next_page_one=view</page>
|
||||
<menu_display>1</menu_display>
|
||||
</view>
|
||||
<update>
|
||||
<name>update</name>
|
||||
</update>
|
||||
<search_show>
|
||||
<name>search_show</name>
|
||||
</search_show>
|
||||
</module_method>
|
||||
</sql_inserts>
|
||||
</install>
|
||||
|
||||
<!-- Tree Menu & Module Methods to load, they will be assigned the group permissions on install time, as selected by the user. -->
|
||||
<module_method>
|
||||
<search>
|
||||
<display>List</display>
|
||||
<menu_display>1</menu_display>
|
||||
<name>search</name>
|
||||
<notes><![CDATA[List records]]></notes>
|
||||
<page><![CDATA[core:search&module=%%&_next_page_one=view]]></page>
|
||||
</search>
|
||||
<search_show>
|
||||
<name>search_show</name>
|
||||
<notes><![CDATA[Show the results of a search]]></notes>
|
||||
</search_show>
|
||||
<update>
|
||||
<name>update</name>
|
||||
<notes><![CDATA[Update a record]]></notes>
|
||||
</update>
|
||||
<view>
|
||||
<name>view</name>
|
||||
<notes><![CDATA[View a record]]></notes>
|
||||
</view>
|
||||
</module_method>
|
||||
</install>
|
||||
|
@@ -1,22 +1,25 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<install>
|
||||
<setup_invoice>
|
||||
<id>1</id>
|
||||
<site_id>1</site_id>
|
||||
<bill_to_company>1</bill_to_company>
|
||||
<invoice_currency>$</invoice_currency>
|
||||
<invoice_decimals>5</invoice_decimals>
|
||||
<items_summary_max>16</items_summary_max>
|
||||
<news></news>
|
||||
<page_type>1</page_type>
|
||||
<invoice_delivery>0</invoice_delivery>
|
||||
<invoice_show_itemized>1</invoice_show_itemized>
|
||||
<invoice_grace>0</invoice_grace>
|
||||
<invoice_advance_gen>0</invoice_advance_gen>
|
||||
<invoice_terms>0</invoice_terms>
|
||||
<invoice_pdf_plugin>overview</invoice_pdf_plugin>
|
||||
</setup_invoice>
|
||||
<setup_invoice_id>
|
||||
<id>2</id>
|
||||
</setup_invoice_id>
|
||||
</install>
|
||||
<setup_invoice>
|
||||
<id>1</id>
|
||||
<site_id>1</site_id>
|
||||
<bill_to_company>1</bill_to_company>
|
||||
<invoice_currency>$</invoice_currency>
|
||||
<invoice_decimals>2</invoice_decimals>
|
||||
<items_summary_max>16</items_summary_max>
|
||||
<news></news>
|
||||
<page_type>blank</page_type>
|
||||
<invoice_delivery>1</invoice_delivery>
|
||||
<invoice_show_itemized>1</invoice_show_itemized>
|
||||
<invoice_grace>0</invoice_grace>
|
||||
<invoice_advance_gen>0</invoice_advance_gen>
|
||||
<invoice_terms>0</invoice_terms>
|
||||
<invoice_pdf_plugin>itemised_fpdf</invoice_pdf_plugin>
|
||||
<invoice_pdf_plugin>itemised_fpdf</invoice_pdf_plugin>
|
||||
<invoice_advance_notice>7</invoice_advance_notice>
|
||||
</setup_invoice>
|
||||
|
||||
<setup_invoice_id>
|
||||
<id>2</id>
|
||||
</setup_invoice_id>
|
||||
</install>
|
||||
|
Reference in New Issue
Block a user