Initial Commit of AgileBill Open Source
This commit is contained in:
47
modules/invoice_commission/invoice_commission.inc.php
Normal file
47
modules/invoice_commission/invoice_commission.inc.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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/
|
||||
*
|
||||
* @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>
|
||||
* @package AgileBill
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
class invoice_commission
|
||||
{
|
||||
|
||||
# Open the constructor for this mod
|
||||
function invoice_commission()
|
||||
{
|
||||
# name of this module:
|
||||
$this->module = "invoice_commission";
|
||||
|
||||
# location of the construct XML file:
|
||||
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
|
||||
|
||||
# open the construct file for parsing
|
||||
$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"];
|
||||
}
|
||||
}
|
||||
?>
|
60
modules/invoice_commission/invoice_commission_construct.xml
Normal file
60
modules/invoice_commission/invoice_commission_construct.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<construct>
|
||||
<!-- define the module name -->
|
||||
<module>invoice_commission</module>
|
||||
<!-- define the module table name -->
|
||||
<table>invoice_commission</table>
|
||||
<!-- define the module dependancy(s) -->
|
||||
<dependancy>invoice</dependancy>
|
||||
<!-- define the DB cache in seconds -->
|
||||
<cache>0</cache>
|
||||
<!-- define the default order_by field for SQL queries -->
|
||||
<order_by>invoice_id</order_by>
|
||||
<!-- define the methods -->
|
||||
<limit>25</limit>
|
||||
<!-- define database indexes -->
|
||||
<index>
|
||||
<date>date_orig</date>
|
||||
<commission>affiliate_commission_id</commission>
|
||||
<invoice>invoice_id</invoice>
|
||||
<affiliate>affiliate_id</affiliate>
|
||||
<status>status</status>
|
||||
</index>
|
||||
<!-- define the fields -->
|
||||
<field>
|
||||
<id>
|
||||
<type>I8</type>
|
||||
<unique>1</unique>
|
||||
<index>1</index>
|
||||
</id>
|
||||
<site_id>
|
||||
<type>I4</type>
|
||||
<index>1</index>
|
||||
</site_id>
|
||||
<date_orig>
|
||||
<type>I8</type>
|
||||
</date_orig>
|
||||
<date_last>
|
||||
<type>I8</type>
|
||||
</date_last>
|
||||
<affiliate_commission_id>
|
||||
<type>I4</type>
|
||||
</affiliate_commission_id>
|
||||
<invoice_id>
|
||||
<type>I8</type>
|
||||
</invoice_id>
|
||||
<affiliate_id>
|
||||
<type>C(32)</type>
|
||||
</affiliate_id>
|
||||
<commission>
|
||||
<type>F</type>
|
||||
</commission>
|
||||
<status>
|
||||
<type>L</type>
|
||||
</status>
|
||||
</field>
|
||||
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
|
||||
<method/>
|
||||
<!-- define the method triggers -->
|
||||
<trigger>0</trigger>
|
||||
</construct>
|
12
modules/invoice_commission/invoice_commission_install.xml
Normal file
12
modules/invoice_commission/invoice_commission_install.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<install>
|
||||
<module_properties>
|
||||
<name>invoice_commission</name>
|
||||
<parent>invoice</parent>
|
||||
<notes><![CDATA[Stores the affiliate commissions paid]]></notes>
|
||||
<dependancy>invoice</dependancy>
|
||||
</module_properties>
|
||||
<sql_inserts>
|
||||
<module_method>
|
||||
</module_method>
|
||||
</sql_inserts>
|
||||
</install>
|
Reference in New Issue
Block a user