Overhauled export, and other minor updates
This commit is contained in:
@@ -9,51 +9,123 @@
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_Admin_Export extends Controller_TemplateDefault_Admin {
|
||||
protected $control_title = 'Export';
|
||||
class Controller_Admin_Export extends Controller_Export {
|
||||
protected $secure_actions = array(
|
||||
'add'=>TRUE,
|
||||
'edit'=>TRUE,
|
||||
'index'=>TRUE,
|
||||
'module'=>TRUE,
|
||||
);
|
||||
|
||||
/**
|
||||
* Add Export Maping items
|
||||
*/
|
||||
public function action_add() {
|
||||
$eo = ORM::factory('Export');
|
||||
$output = '';
|
||||
if (empty($_POST['export_module_id']) OR empty($_POST['module_id']))
|
||||
HTTP::redirect(URL::link('admin','export/index'));
|
||||
|
||||
if ($_POST AND $eo->values($_POST)->check()) {
|
||||
$eo->module_id = ORM::factory('Module',array('name'=>'product'))->id; // @todo This probably should be in the form.
|
||||
$eo->plugin_name = 'quicken'; // @todo This should be in the form.
|
||||
// Entry updated
|
||||
if (! $eo->save())
|
||||
throw new Kohana_Exception('Unable to save data :post',array(':post'=>serialize($_POST)));
|
||||
$edo = ORM::factory('Export_DataMap');
|
||||
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('Record add'),
|
||||
'type'=>'info',
|
||||
'body'=>_('Export Map entry added.')
|
||||
));
|
||||
if ($_POST AND isset($_POST['item_id']) AND $edo->values($_POST)->check()) {
|
||||
$edo->status = 1;
|
||||
|
||||
if (! $edo->save())
|
||||
throw HTTP_Exception::factory(501,'Unable to save data :post',array(':post'=>serialize($_POST)));
|
||||
|
||||
SystemMessage::factory()
|
||||
->title('Record added')
|
||||
->type('success')
|
||||
->body(_('Export DataMap record has been added.'));
|
||||
}
|
||||
|
||||
$output .= Form::open();
|
||||
$output .= View::factory($this->viewpath())
|
||||
->set('eo',$eo);
|
||||
|
||||
$output .= '<div>'.Form::submit('submit',_('Add'),array('class'=>'form_button')).'</div>';
|
||||
$output .= Form::close();
|
||||
|
||||
Block::add(array(
|
||||
'title'=>_('Add Export Map'),
|
||||
'body'=>$output,
|
||||
));
|
||||
Block::factory()
|
||||
->title('Add Export Item Map')
|
||||
->title_icon('icon-plus-sign')
|
||||
->type('form-horizontal')
|
||||
->body(View::factory('export/admin/add')
|
||||
->set('o',$edo)
|
||||
->set('emo',ORM::factory('Export_Module',$_POST['export_module_id']))
|
||||
->set('module',ORM::factory('Module',$_POST['module_id'])->module()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit Export Maping items
|
||||
* Select our primary export target
|
||||
*/
|
||||
public function action_edit() {
|
||||
public function action_index() {
|
||||
$output = '';
|
||||
|
||||
if ($_POST and isset($_POST['eid'])) {
|
||||
$select = array();
|
||||
foreach (ORM::factory('Export_Module')->where('export_id','=',$_POST['eid'])->find_all() as $emo)
|
||||
$select[$emo->id] = $emo->module->name;
|
||||
|
||||
$output .= Form::open(URL::link('admin','export/add'));
|
||||
$output .= Form::select('export_module_id',$select);
|
||||
$output .= Form::button('submit','Submit',array('class'=>'btn btn-primary'));
|
||||
|
||||
// @todo This shouldnt be hard coded.
|
||||
$output .= Form::hidden('module_id',ORM::factory('Product')->mid());
|
||||
|
||||
} else {
|
||||
|
||||
$output .= Form::open();
|
||||
$output .= Form::select('eid',ORM::factory('Export')->list_select());
|
||||
$output .= Form::button('submit','Submit',array('class'=>'btn btn-primary'));
|
||||
}
|
||||
|
||||
$output .= Form::close();
|
||||
|
||||
Block::factory()
|
||||
->title('Select Export Target')
|
||||
->title_icon('icon-share')
|
||||
->body($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the export module settings
|
||||
*/
|
||||
public function action_module() {
|
||||
if ($_POST AND isset($_POST['export_module_id'])) {
|
||||
$emo = ORM::factory('Export_Module',$_POST['export_module_id']);
|
||||
|
||||
if ($emo->loaded()) {
|
||||
$emo->values($_POST);
|
||||
$emo->save();
|
||||
|
||||
if ($emo->saved())
|
||||
SystemMessage::factory()
|
||||
->title('Record updated')
|
||||
->type('success')
|
||||
->body(_('Export Module record has been updated.'));
|
||||
}
|
||||
}
|
||||
|
||||
if ($x = $this->request->param('id')) {
|
||||
$emo = ORM::factory('Export_Module',$x);
|
||||
|
||||
if ($emo->loaded())
|
||||
Block::factory()
|
||||
->title(sprintf('Export Module: %s for %s',$emo->module->display('name'),$emo->export->display('name')))
|
||||
->title_icon('icon-wrench')
|
||||
->type('form-horizontal')
|
||||
->body(View::factory('export/module/admin/edit')->set('o',$emo));
|
||||
|
||||
} else {
|
||||
Block::factory()
|
||||
->title('Export Module Update')
|
||||
->title_icon('icon-th-list')
|
||||
->body(Table::factory()
|
||||
->data(ORM::factory('Export_Module')->find_all())
|
||||
->jssort(TRUE)
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'export->name'=>'Name',
|
||||
'module->name'=>'Module'
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('admin','export/module/')),
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -1,87 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides OSB exporting capabilities.
|
||||
*
|
||||
* @package Export
|
||||
* @category Controllers/Affiliate
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_Affiliate_Export extends Controller_TemplateDefault_Affiliate {
|
||||
protected $control_title = 'Export';
|
||||
protected $secure_actions = array(
|
||||
'index'=>TRUE,
|
||||
'export'=>TRUE,
|
||||
);
|
||||
|
||||
/**
|
||||
* Export plugins must define an export action.
|
||||
*/
|
||||
public function action_export() {
|
||||
if (empty($_POST['plugin']))
|
||||
$this->request->redirect('affiliate/export/index');
|
||||
|
||||
$sc = Kohana::classname('Export_'.$_POST['plugin']);
|
||||
if (! class_exists($sc))
|
||||
throw new Kohana_Exception('Export Class doesnt exist for :plugin',array(':plugin'=>$_POST['plugin']));
|
||||
else
|
||||
$export = new $sc;
|
||||
|
||||
// @todo: Need to limit this to affiliate acounts
|
||||
$export->export();
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the main call to export, providing a list of items to export and
|
||||
* setting up the page to call the export plugin when submitted.
|
||||
*/
|
||||
public function action_index() {
|
||||
// @todo this should come from a file list
|
||||
$TBRexportplugins = array('quicken'=>'Export to Quicken');
|
||||
|
||||
// @todo: Need to limit this to affiliate acounts
|
||||
$p = ORM::factory('Payment');
|
||||
|
||||
if ($p->find_all()->count()) {
|
||||
Block::add(array(
|
||||
'title'=>_('Payments to Export'),
|
||||
'body'=>Table::display(
|
||||
$p->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID'),
|
||||
'date_payment'=>array('label'=>'Date'),
|
||||
'checkout->display("name")'=>array('label'=>'Method'),
|
||||
'account->accnum()'=>array('label'=>'Acc Num'),
|
||||
'account->name()'=>array('label'=>'Account'),
|
||||
'total_amt'=>array('label'=>'Total','class'=>'right'),
|
||||
'balance(TRUE)'=>array('label'=>'Balance','class'=>'right'),
|
||||
'invoicelist()'=>array('label'=>'Invoices'),
|
||||
),
|
||||
array(
|
||||
'page'=>TRUE,
|
||||
'type'=>'select',
|
||||
'form'=>'affiliate/export/export',
|
||||
'hidden'=>array(
|
||||
Form::hidden('plugin','quicken'),
|
||||
),
|
||||
'button'=>array(
|
||||
Form::submit('submit',_('Export'),array('class'=>'form_button')),
|
||||
),
|
||||
)),
|
||||
));
|
||||
|
||||
# Nothing to export
|
||||
} else {
|
||||
SystemMessage::add(array(
|
||||
'title'=>_('No payments to export'),
|
||||
'type'=>'info',
|
||||
'body'=>sprintf(_('There are no payments within the last %s days (since %s) to show.'),
|
||||
$daysago,date(Kohana::$config->load('osb')->date_format,$daysago*86400+time())),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
104
modules/export/classes/Controller/Reseller/Export.php
Normal file
104
modules/export/classes/Controller/Reseller/Export.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides OSB exporting capabilities.
|
||||
*
|
||||
* @package Export
|
||||
* @category Controllers/Reseller
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Controller_Reseller_Export extends Controller_Export {
|
||||
protected $secure_actions = array(
|
||||
'export'=>TRUE,
|
||||
'index'=>TRUE,
|
||||
'list'=>TRUE,
|
||||
);
|
||||
|
||||
/**
|
||||
* Export plugins must define an export action.
|
||||
*/
|
||||
public function action_export() {
|
||||
$this->auto_render = FALSE;
|
||||
|
||||
if (empty($_POST['export_module_id']) OR ! ($emo = ORM::factory('Export_Module',$_POST['export_module_id'])) OR ! $emo->loaded())
|
||||
HTTP::redirect(URL::link('reseller','export/index'));
|
||||
|
||||
$emo->export->plugin($emo)->export($this->response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Select our primary export target
|
||||
*/
|
||||
public function action_index() {
|
||||
$output = '';
|
||||
|
||||
$output .= Form::open(URL::link('reseller','export/list'));
|
||||
$output .= Form::select('eid',ORM::factory('Export')->list_select());
|
||||
$output .= Form::button('submit','Submit',array('class'=>'btn btn-primary'));
|
||||
$output .= Form::close();
|
||||
|
||||
Block::factory()
|
||||
->title('Select Export Target')
|
||||
->title_icon('icon-share')
|
||||
->body($output);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the main call to export, providing a list of items to export and
|
||||
* setting up the page to call the export plugin when submitted.
|
||||
*/
|
||||
public function action_list() {
|
||||
if (empty($_POST['eid']))
|
||||
HTTP::redirect(URL::link('reseller','export/index'));
|
||||
|
||||
$eo = ORM::factory('Export',$_POST['eid']);
|
||||
|
||||
if (! $eo->loaded())
|
||||
HTTP::redirect(URL::link('reseller','export/index'));
|
||||
|
||||
$c = 0;
|
||||
|
||||
$output = '<div class="tabbable span11">';
|
||||
|
||||
$output .= '<ul class="nav nav-tabs">';
|
||||
// @todo To limit to Reseller accounts only
|
||||
foreach ($eo->export_module->find_all() as $emo)
|
||||
$output .= sprintf('<li class="%s"><a href="#tab%s" data-toggle="tab">%s</a></li>',$c++ ? '' : 'active',$emo->id,ucfirst($emo->module->module()->object_name()));
|
||||
$output .= '</ul>';
|
||||
|
||||
$c = 0;
|
||||
$output .= '<div class="tab-content">';
|
||||
foreach ($eo->export_module->find_all() as $emo) {
|
||||
$output .= sprintf('<div class="tab-pane %s" id="tab%s">',$c++ ? '' : 'active',$emo->id);
|
||||
|
||||
$output .= Table::factory()
|
||||
->data($emo->list_export())
|
||||
->jssort($emo->id)
|
||||
->columns(Arr::merge(array(
|
||||
'id'=>'ID',
|
||||
'account->name(TRUE)'=>'Account',
|
||||
'date_orig'=>'Date',
|
||||
'status(TRUE)'=>'Active',
|
||||
'total(TRUE)'=>'Total',
|
||||
'exported'=>'Exported',
|
||||
),$emo->display ? $emo->display : array()))
|
||||
->select(URL::link('reseller','export/export'),$emo->id,array('export_module_id'=>$emo->id))
|
||||
->prepend(array(
|
||||
'id'=>array('checkbox'=>'id[]'),
|
||||
))->filters(array(
|
||||
'exported'=>array(array('Config::date',array(':value'))),
|
||||
));
|
||||
|
||||
$output .= '</div>';
|
||||
}
|
||||
$output .= '</div>';
|
||||
|
||||
Block::factory()
|
||||
->title('Export Transactions')
|
||||
->title_icon('icon-share')
|
||||
->body($output);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,21 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides OSB exporting capabilities for OSB.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Export {
|
||||
// Name of export plugin.
|
||||
protected $plugin;
|
||||
|
||||
public function __construct() {
|
||||
$this->plugin = preg_replace('/^'.get_parent_class($this).'_/','',get_class($this));
|
||||
$this->response = Response::factory();
|
||||
}
|
||||
}
|
||||
?>
|
19
modules/export/classes/Export/Plugin.php
Normal file
19
modules/export/classes/Export/Plugin.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class enables common Export functions for Plugins
|
||||
*
|
||||
* @package Export
|
||||
* @category Plugins
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
abstract class Export_Plugin {
|
||||
protected $emo; // Our Export Object
|
||||
|
||||
public function __construct(Model_Export_Module $emo) {
|
||||
$this->emo = $emo;
|
||||
}
|
||||
}
|
||||
?>
|
288
modules/export/classes/Export/Plugin/Quicken.php
Normal file
288
modules/export/classes/Export/Plugin/Quicken.php
Normal file
@@ -0,0 +1,288 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides OSB exporting capabilities for Quickbooks.
|
||||
*
|
||||
* @package Export
|
||||
* @category Plugins
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Export_Plugin_Quicken extends Export_Plugin {
|
||||
public function export(Response $response) {
|
||||
$output = '';
|
||||
|
||||
if (! isset($_POST['id']) OR ! $_POST['id'] OR ! $this->emo->loaded())
|
||||
HTTP::redirect(URL::link('reseller','export/index'));
|
||||
|
||||
$o = ORM::factory('Module',$this->emo->module_id);
|
||||
|
||||
if (! $o->loaded())
|
||||
HTTP::redirect(URL::link('reseller','export/index'));
|
||||
|
||||
switch ($o->name) {
|
||||
case 'invoice': $output .= $this->invoices($_POST['id']);
|
||||
break;
|
||||
|
||||
case 'payment': $output .= $this->payments($_POST['id']);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw HTTP_Exception::factory(501,'Dont know how to export :name',array(':name'=>$o->name));
|
||||
}
|
||||
|
||||
$response->body($output);
|
||||
$response->send_file(TRUE,'quicken-import.iif',array('mime_type'=>'text/plain'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Export an invoice
|
||||
*/
|
||||
private function invoice(Model_Invoice $io) {
|
||||
$defaults = array(
|
||||
'ACCNT'=>'Accounts Receivable',
|
||||
'TRNSTYPE'=>'TAX_INVOICE',
|
||||
'INVMEMO'=>'Thank you for using '.Company::instance()->name(),
|
||||
'CLEAR'=>'N',
|
||||
'TOPRINT'=>'N',
|
||||
'PAID'=>'N',
|
||||
'MEMO'=>'Import from OSB',
|
||||
'INVTITLE'=>Company::instance()->name().' Invoice',
|
||||
);
|
||||
|
||||
$invoice = $items = array();
|
||||
|
||||
$invoice['TRNSID'] = sprintf('%06s',$io->id);
|
||||
$invoice['DATE'] = date('m/d/Y',$io->date_orig);
|
||||
$invoice['ADDR1'] = $io->account->address1;
|
||||
$invoice['ADDR2'] = $io->account->address2;
|
||||
$invoice['ADDR3'] = sprintf('%s, %s %s',$io->account->city,$io->account->state,$io->account->zip);
|
||||
// @todo - should be configurable
|
||||
# $invoice['TERMS'] = '7 Days';
|
||||
$invoice['DOCNUM'] = sprintf('%06s',$io->id);
|
||||
$invoice['DUEDATE'] = date('m/d/Y',$io->due_date);
|
||||
$invoice['AMOUNT'] = sprintf('%3.2f',$io->total());
|
||||
|
||||
$invoice['NAME'] = $io->account->company ? $io->account->company : sprintf('%s %s',$io->account->last_name,$io->account->first_name);
|
||||
|
||||
// Other Quicken fields not used.
|
||||
#$invoice['CLASS'] = '';
|
||||
#$invoice['SHIPVIA'] = '';
|
||||
#$invoice['SHIPDATE'] = '';
|
||||
#$invoice['OTHER1'] = '';
|
||||
#$invoice['REP'] = '';
|
||||
#$invoice['FOB'] = '';
|
||||
#$invoice['PONUM'] = '';
|
||||
#$invoice['SADDR1'] = '';
|
||||
#$invoice['SADDR2'] = '';
|
||||
#$invoice['SADDR3'] = '';
|
||||
#$invoice['SADDR4'] = '';
|
||||
#$invoice['SADDR5'] = '';
|
||||
|
||||
$c = 0;
|
||||
|
||||
// Add the items to the invoice
|
||||
foreach ($io->invoice_item->find_all() as $iio) {
|
||||
// Skip any zero amount items not relating to a service
|
||||
if ($iio->total() == 0 and ! $iio->service_id)
|
||||
continue;
|
||||
|
||||
// Get the mapping item for account purposes
|
||||
if ($iio->product_id) {
|
||||
$edo = ORM::factory('Export_DataMap')
|
||||
->where('module_id','=',$iio->product->mid())
|
||||
->and_where('item_id','=',$iio->product_id)
|
||||
->find();
|
||||
|
||||
if ($edo->loaded()) {
|
||||
$items[$c]['ACCNT'] = $edo->map_data['account'];
|
||||
$items[$c]['INVITEM'] = $edo->map_data['item'];
|
||||
|
||||
} else {
|
||||
throw HTTP_Exception::factory(501,'Missing product map data for :product (:id)',array(':product'=>$iio->product->title(),':id'=>$iio->product_id));
|
||||
}
|
||||
|
||||
$items[$c]['MEMO'] = sprintf('%s (%s)',$iio->product->title(),$iio->period());
|
||||
|
||||
// Non product item
|
||||
} else {
|
||||
$items[$c]['ACCNT'] = 'Other Income';
|
||||
$items[$c]['INVITEM'] = 'Unknown';
|
||||
$items[$c]['MEMO'] = $iio->period();
|
||||
}
|
||||
|
||||
$items[$c]['CLEAR'] = 'N';
|
||||
$items[$c]['QNTY'] = -1;
|
||||
|
||||
if ($iio->tax_items()) {
|
||||
// @todo, need to figure out how multiple tax items are handled
|
||||
if (count($iio->tax_items()) > 1)
|
||||
throw HTTP_Exception(501,'Export cant handle multiple tax items yet');
|
||||
|
||||
foreach ($iio->tax_items() as $tid => $amount) {
|
||||
$to = ORM::factory('Tax',$tid);
|
||||
|
||||
$items[$c]['TAXABLE'] = 'Y';
|
||||
$items[$c]['TAXCODE'] = $to->description;
|
||||
$items[$c]['TAXRATE'] = sprintf('%3.2f%%',$to->rate);
|
||||
$items[$c]['TAXAMOUNT'] = sprintf('%3.2f',$amount*-1);
|
||||
}
|
||||
|
||||
} else {
|
||||
$items[$c]['TAXAMOUNT'] = 0;
|
||||
}
|
||||
|
||||
// @todo This rounding should be a system config.
|
||||
$items[$c]['PRICE'] = sprintf('%3.2f',round($iio->subtotal()-$iio->discount(),2));
|
||||
$items[$c]['AMOUNT'] = sprintf('%3.2f',round($iio->subtotal()-$iio->discount(),2)*-1);
|
||||
|
||||
$c++;
|
||||
}
|
||||
|
||||
// Add credits as a other item
|
||||
if ($io->total_credits()) {
|
||||
$items[$c]['ACCNT'] = 'Other Income';
|
||||
$items[$c]['INVITEM'] = 'Product:Unknown';
|
||||
$items[$c]['CLEAR'] = 'N';
|
||||
$items[$c]['QNTY'] = 1;
|
||||
$items[$c]['MEMO'] = 'Credit Item';
|
||||
$items[$c]['TAXAMOUNT'] = 0;
|
||||
|
||||
$items[$c]['PRICE'] = sprintf('%3.2f',round(($io->total_credits()-$io->tax())*-1,2));
|
||||
$items[$c]['AMOUNT'] = sprintf('%3.2f',round(($io->total_credits()-$io->tax()),2));
|
||||
}
|
||||
|
||||
return $this->output(Arr::merge($defaults,$invoice),$items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Export selected invoices
|
||||
*/
|
||||
private function invoices(array $ids) {
|
||||
$output = '';
|
||||
|
||||
foreach ($ids as $id)
|
||||
$output .= $this->invoice(ORM::factory('Invoice',$id));
|
||||
|
||||
// If all went OK, update our export status
|
||||
$this->update($ids);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return exported data for download
|
||||
*/
|
||||
private function output(array $trans,array $items) {
|
||||
$output = '';
|
||||
|
||||
$output .= "!TRNS\t";
|
||||
$output .= implode("\t",array_keys($trans))."\n";
|
||||
$output .= "TRNS\t";
|
||||
$output .= implode("\t",array_values($trans))."\n";
|
||||
|
||||
$spl = 0;
|
||||
foreach ($items as $detail) {
|
||||
if (! $spl) {
|
||||
$output .= "!SPL\tSPLID\t";
|
||||
$output .= implode("\t",array_keys($detail))."\n";
|
||||
}
|
||||
|
||||
$output .= sprintf("SPL\t%s\t%s\n",$spl++,implode("\t",array_values($detail)));
|
||||
}
|
||||
|
||||
$output .= "ENDTRNS\n";
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Export a payment
|
||||
*/
|
||||
private function payment(Model_Payment $po) {
|
||||
$defaults = array(
|
||||
'CLEAR'=>'N',
|
||||
'TRNSTYPE'=>'PAYMENT',
|
||||
);
|
||||
|
||||
$payment = $items = array();
|
||||
|
||||
$payment['AMOUNT'] = sprintf('%3.2f',$po->total_amt);
|
||||
$payment['TRNSID'] = sprintf('P%06s',$po->id);
|
||||
$payment['DATE'] = date('m/d/Y',$po->date_payment);
|
||||
|
||||
$payment['NAME'] = $po->account->company ? $po->account->company : sprintf('%s %s',$po->account->last_name,$po->account->first_name);
|
||||
|
||||
$payment['MEMO'] = sprintf('Payment for invoice(s) %s (%s)',implode(':',$po->invoices()),$po->checkout->name);
|
||||
|
||||
// @todo Accounts/Payment should be configurable
|
||||
switch ($po->checkout->plugin) {
|
||||
// @todo this is direct debit
|
||||
case 'DD_EZYPAY':
|
||||
$payment['PAYMETH'] = 'DirectDebit';
|
||||
$payment['ACCNT'] = 'Ezypay';
|
||||
break;
|
||||
|
||||
case 'REMIT_CHEQUE':
|
||||
$payment['PAYMETH'] = 'Cheque';
|
||||
$payment['ACCNT'] = 'Undeposited Funds';
|
||||
break;
|
||||
|
||||
case 'REMIT_BANK_WIRE':
|
||||
$payment['PAYMETH'] = 'DirectCredit';
|
||||
$payment['ACCNT'] = 'Bendigo Bank';
|
||||
break;
|
||||
|
||||
case 'PAYPAL_CART':
|
||||
$payment['PAYMETH'] = 'Paypal';
|
||||
$payment['ACCNT'] = 'Paypal';
|
||||
break;
|
||||
|
||||
default:
|
||||
$payment['PAYMETH'] = 'TBA';
|
||||
$payment['ACCNT'] = 'Undeposited Funds';
|
||||
}
|
||||
|
||||
$items[0]['TRANSTYPE'] = 'PAYMENT';
|
||||
$items[0]['CLEAR'] = 'N';
|
||||
$items[0]['ACCNT'] = 'Accounts Receivable';
|
||||
$items[0]['AMOUNT'] = $po->total();
|
||||
|
||||
return $this->output(Arr::merge($defaults,$payment),$items);
|
||||
}
|
||||
|
||||
/**
|
||||
* Export selected invoices
|
||||
*/
|
||||
private function payments(array $ids) {
|
||||
$output = '';
|
||||
|
||||
foreach ($ids as $id)
|
||||
$output .= $this->payment(ORM::factory('Payment',$id));
|
||||
|
||||
// If all went OK, update our export status
|
||||
$this->update($ids);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
private function update(array $ids) {
|
||||
foreach ($ids as $id) {
|
||||
// Check if we have exported this item already
|
||||
$eio = ORM::factory('Export_Item')
|
||||
->where('item_id','=',$id)
|
||||
->and_where('export_module_id','=',$this->emo->id)
|
||||
->find();
|
||||
|
||||
if (! $eio->loaded()) {
|
||||
$eio->item_id = $id;
|
||||
$eio->export_module_id = $this->emo->id;
|
||||
}
|
||||
|
||||
$eio->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,217 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides OSB exporting capabilities for Quickbooks.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Export_Quicken extends Export {
|
||||
public function export() {
|
||||
if (! empty($_POST['id']) AND count($_POST['id'])) {
|
||||
$qo = new Quicken;
|
||||
|
||||
foreach ($_POST['id'] as $pid) {
|
||||
$po = ORM::factory('Payment',$pid);
|
||||
|
||||
if ($po->loaded()) {
|
||||
$invoice_ids = array();
|
||||
|
||||
foreach ($po->payment_item->find_all() as $pio) {
|
||||
// If our invoice ID is not blank, then the payment was applied to an invoice
|
||||
if ($pio->invoice->id) {
|
||||
// Record our invoice IDs for the summary
|
||||
array_push($invoice_ids,$pio->invoice->id);
|
||||
|
||||
$qio = new Quicken_Invoice;
|
||||
$qio->TRNSID = sprintf('%06s',$pio->invoice->id);
|
||||
$qio->DATE = date('m/d/Y',$pio->invoice->date_orig);
|
||||
$qio->MEMO = 'Import from OSB';
|
||||
$qio->CLEAR = 'N';
|
||||
$qio->TOPRINT = 'N';
|
||||
$qio->PAID = 'N';
|
||||
$qio->ADDR1 = $po->account->address1;
|
||||
$qio->ADDR2 = $po->account->address2;
|
||||
$qio->ADDR3 = sprintf('%s, %s %s',$po->account->city,$po->account->state,$po->account->zip);
|
||||
// @todo - should be configurable
|
||||
$qio->TERMS = '7 Days';
|
||||
// @todo - should be configurable
|
||||
$qio->INVTITLE = Company::instance()->name().' Invoice';
|
||||
// @todo - should be configurable
|
||||
$qio->INVMEMO = 'Thank you for using '.Company::instance()->name();
|
||||
$qio->DOCNUM = sprintf('%06s',$pio->invoice->id);
|
||||
$qio->DUEDATE = date('m/d/Y',$pio->invoice->due_date);
|
||||
$qio->AMOUNT = sprintf('%3.2f',$pio->invoice->total());
|
||||
|
||||
if ($po->account->company)
|
||||
$qio->NAME = $po->account->company;
|
||||
else
|
||||
$qio->NAME = sprintf('%s %s',$po->account->last_name,$po->account->first_name);
|
||||
|
||||
// Other Quicken fields not used.
|
||||
#$qio->CLASS = '';
|
||||
#$qio->SHIPVIA = '';
|
||||
#$qio->SHIPDATE = '';
|
||||
#$qio->OTHER1 = '';
|
||||
#$qio->REP = '';
|
||||
#$qio->FOB = '';
|
||||
#$qio->PONUM = '';
|
||||
#$qio->SADDR1 = '';
|
||||
#$qio->SADDR2 = '';
|
||||
#$qio->SADDR3 = '';
|
||||
#$qio->SADDR4 = '';
|
||||
#$qio->SADDR5 = '';
|
||||
|
||||
// Add the items to the invoice
|
||||
foreach ($pio->invoice->invoice_item->find_all() as $iio) {
|
||||
$qto = new Quicken_InvoiceItem;
|
||||
|
||||
if ($iio->period())
|
||||
$daterange = $iio->period();
|
||||
|
||||
// @todo This should go.
|
||||
elseif ($iio->product_attr && preg_match('/^a/',$iio->product_attr)) {
|
||||
echo 'Uncaptured';die();
|
||||
|
||||
// @todo This should go.
|
||||
} elseif ($iio->product_attr && preg_match('/^s/',$iio->product_attr))
|
||||
$daterange = preg_replace("/\r?\n/",' ',unserialize($iio->product_attr));
|
||||
|
||||
else
|
||||
$daterange = '';
|
||||
|
||||
if ($iio->product_id) {
|
||||
$mo = ORM::factory('Module',array('name'=>'product'));
|
||||
$eo = ORM::factory('Export')
|
||||
->where('plugin_name','=',strtolower($this->plugin))
|
||||
->and_where('module_id','=',$mo->id)
|
||||
->and_where('item_id','=',$iio->product_id)
|
||||
->find();
|
||||
|
||||
if ($eo->loaded()) {
|
||||
$qto->ACCNT = $eo->map_data['account'];
|
||||
$qto->INVITEM = $eo->map_data['item'];
|
||||
|
||||
} else {
|
||||
throw new Kohana_Exception('Missing product map data for :product (:id)',
|
||||
array(':product'=>$iio->product->title(),':id'=>$iio->product_id));
|
||||
|
||||
$qto->ACCNT = 'Other Income';
|
||||
$qto->INVITEM = 'Product:Unknown';
|
||||
}
|
||||
|
||||
$qto->MEMO = sprintf('%s (%s)',
|
||||
$iio->product->product_translate->find()->name,$daterange);
|
||||
|
||||
} else {
|
||||
$qto->ACCNT = 'Other Income';
|
||||
$qto->INVITEM = 'Unknown';
|
||||
$qto->MEMO = sprintf('%s (%s)',
|
||||
$iio->product->product_translate->find()->name,$daterange);
|
||||
}
|
||||
|
||||
$qto->CLEAR = 'N';
|
||||
$qto->QNTY = -1;
|
||||
|
||||
if ($pio->invoice->tax()) {
|
||||
$qto->TAXABLE = 'Y';
|
||||
# @todo, get this from OSB
|
||||
$qto->TAXCODE = 'GST';
|
||||
$qto->TAXRATE = sprintf('%3.2f%%','0.10');
|
||||
$qto->TAXAMOUNT = sprintf('%3.2f',$iio->tax()*-1);
|
||||
} else {
|
||||
$qto->TAXAMOUNT = 0;
|
||||
}
|
||||
|
||||
// @todo This rounding should be a system config.
|
||||
$qto->PRICE = sprintf('%3.2f',round($iio->subtotal()-$iio->discount(),2));
|
||||
$qto->AMOUNT = sprintf('%3.2f',round($iio->subtotal()-$iio->discount(),2)*-1);
|
||||
|
||||
$qio->addInvoiceItem($qto);
|
||||
}
|
||||
|
||||
// Add credits as a other item
|
||||
$qto = new Quicken_InvoiceItem;
|
||||
$qto->ACCNT = 'Other Income';
|
||||
$qto->INVITEM = 'Product:Unknown';
|
||||
$qto->CLEAR = 'N';
|
||||
$qto->QNTY = 1;
|
||||
$qto->MEMO = 'Credit Item';
|
||||
|
||||
if ($pio->invoice->tax()) {
|
||||
$qto->TAXABLE = 'Y';
|
||||
# @todo, get this from OSB
|
||||
$qto->TAXCODE = 'GST';
|
||||
$qto->TAXRATE = sprintf('%3.2f%%','0.10');
|
||||
$tax = round($pio->invoice->total_credits()/11,2);
|
||||
$qto->TAXAMOUNT = sprintf('%3.2f',$tax);
|
||||
} else {
|
||||
$qto->TAXAMOUNT = 0;
|
||||
}
|
||||
|
||||
$qto->PRICE = sprintf('%3.2f',round(($pio->invoice->total_credits()-$tax)*-1,2));
|
||||
$qto->AMOUNT = sprintf('%3.2f',round(($pio->invoice->total_credits()-$tax),2));
|
||||
$qio->addInvoiceItem($qto);
|
||||
|
||||
$qo->addInvoice($qio);
|
||||
}
|
||||
}
|
||||
|
||||
$qpo = new Quicken_Payment;
|
||||
$qpo->AMOUNT = sprintf('%3.2f',$po->total_amt);
|
||||
$qpo->TRNSID = sprintf('P%06s',$po->id);
|
||||
$qpo->DATE = date('m/d/Y',$po->date_payment);
|
||||
|
||||
// @todo this should be from a function - when no invoice is paid we cant use $qio
|
||||
if ($po->account->company)
|
||||
$qpo->NAME = $po->account->company;
|
||||
else
|
||||
$qpo->NAME = sprintf('%s %s',$po->account->last_name,$po->account->first_name);
|
||||
|
||||
$qpo->CLEAR = 'N';
|
||||
$qpo->MEMO = sprintf('Payment for invoice(s) %s (%s)',implode(':',$invoice_ids),$po->checkout->name);
|
||||
|
||||
// @todo Accounts/Payment should be configurable
|
||||
switch ($po->checkout->plugin) {
|
||||
// @todo this is direct debit
|
||||
case 'DD_EZYPAY':
|
||||
$qpo->PAYMETH = 'DirectDebit';
|
||||
$qpo->ACCNT = 'Ezypay';
|
||||
break;
|
||||
|
||||
case 'REMIT_CHEQUE':
|
||||
$qpo->PAYMETH = 'Cheque';
|
||||
$qpo->ACCNT = 'Undeposited Funds';
|
||||
break;
|
||||
|
||||
case 'REMIT_BANK_WIRE':
|
||||
$qpo->PAYMETH = 'DirectCredit';
|
||||
$qpo->ACCNT = 'Bendigo Bank';
|
||||
break;
|
||||
|
||||
case 'PAYPAL_CART':
|
||||
$qpo->PAYMETH = 'Paypal';
|
||||
$qpo->ACCNT = 'Paypal';
|
||||
break;
|
||||
|
||||
default:
|
||||
$qpo->PAYMETH = 'TBA';
|
||||
$qpo->ACCNT = 'Undeposited Funds';
|
||||
}
|
||||
|
||||
if (isset($qio))
|
||||
$qio->addPayment($qpo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($qo))
|
||||
$this->response->body($qo->export());
|
||||
|
||||
$this->response->send_file(TRUE,'quicken-import.iif',array('mime_type'=>'text/plain'));
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,31 +1,34 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class supports OSB exporting by rending the exportable items.
|
||||
* This class supports OSB exporting.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @category Model
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Export extends ORM_OSB {
|
||||
protected $_serialize_column = array(
|
||||
'map_data',
|
||||
// Relationships
|
||||
protected $_has_many = array(
|
||||
'export_module' => array('far_key'=>'id','xforeign_key'=>'x'),
|
||||
);
|
||||
|
||||
public function list_itemsnoexport() {
|
||||
$result = array();
|
||||
protected $_form = array('id'=>'id','value'=>'name');
|
||||
|
||||
$mo = ORM::factory('Module',array('name'=>'product'));
|
||||
$p = ORM::factory('Product')
|
||||
->order_by('id');
|
||||
/**
|
||||
* Return the object of the product plugin
|
||||
*/
|
||||
public function plugin(Model_Export_Module $emo,$type='') {
|
||||
$c = Kohana::classname('Export_Plugin_'.$this->plugin);
|
||||
|
||||
foreach ($p->find_all() as $po)
|
||||
if (! ORM::factory('Export')->where('module_id','=',$mo->id)->where('item_id','=',$po->id)->find()->loaded())
|
||||
$result[$po->id] = $po;
|
||||
if (! $this->plugin OR ! class_exists($c))
|
||||
return NULL;
|
||||
|
||||
return $result;
|
||||
$o = new $c($emo);
|
||||
|
||||
return $type ? $o->$type : $o;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
36
modules/export/classes/Model/Export/DataMap.php
Normal file
36
modules/export/classes/Model/Export/DataMap.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class supports OSB exporting.
|
||||
*
|
||||
* @package Export
|
||||
* @category Model
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Export_DataMap extends ORM_OSB {
|
||||
// Relationships
|
||||
protected $_belongs_to = array(
|
||||
'export_module' => array(),
|
||||
'module' => array(),
|
||||
);
|
||||
|
||||
public function list_itemsnoexport(Model $o,$emoid,$desc='title()') {
|
||||
$result = array();
|
||||
|
||||
$o->select(array($this->table_name().'.id','edm'))
|
||||
->join($this->table_name(),'LEFT OUTER')
|
||||
->on($this->table_name().'.site_id','=',$o->table_name().'.site_id') // @todo This should be automatic
|
||||
->on($this->table_name().'.item_id','=',$o->table_name().'.id')
|
||||
->on('export_module_id','=',$emoid)
|
||||
->where($o->table_name().'.status','=',TRUE)
|
||||
->having('edm','=',NULL);
|
||||
|
||||
foreach ($o->find_all() as $object)
|
||||
$result[$object->id] = $object->resolve($desc);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,17 +1,18 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Quicken exporting capabilities.
|
||||
* This class supports OSB exporting.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @category Model
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Quicken_Payment extends Quicken {
|
||||
protected $defaults = array(
|
||||
'TRNSTYPE'=>'PAYMENT'
|
||||
class Model_Export_Item extends ORM_OSB {
|
||||
// Relationships
|
||||
protected $_belongs_to = array(
|
||||
'export_module' => array(),
|
||||
);
|
||||
}
|
||||
?>
|
42
modules/export/classes/Model/Export/Module.php
Normal file
42
modules/export/classes/Model/Export/Module.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class supports OSB exporting.
|
||||
*
|
||||
* @package Export
|
||||
* @category Model
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Export_Module extends ORM_OSB {
|
||||
protected $_created_column = FALSE;
|
||||
protected $_updated_column = FALSE;
|
||||
|
||||
// Relationships
|
||||
protected $_belongs_to = array(
|
||||
'export' => array(),
|
||||
'module' => array(),
|
||||
);
|
||||
protected $_has_many = array(
|
||||
'export_item' => array('far_key'=>'id'),
|
||||
);
|
||||
|
||||
protected $_nullifempty = array(
|
||||
'display',
|
||||
);
|
||||
|
||||
public function list_export() {
|
||||
$o = $this->module->module();
|
||||
|
||||
return $o
|
||||
->select(array($this->export_item->table_name().'.date_orig','exported'))
|
||||
->join($this->export_item->table_name(),'LEFT OUTER')
|
||||
->on($this->export_item->table_name().'.site_id','=',$o->table_name().'.site_id') // @todo This should be automatic
|
||||
->on($this->export_item->table_name().'.item_id','=',$o->table_name().'.id')
|
||||
->on('export_module_id','=',$this->id)
|
||||
->where($o->table_name().'.date_orig','>=',time()-86400*90)
|
||||
->find_all();
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,35 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This is the abstract class for all export capabilities.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
abstract class OSBExport {
|
||||
private $_data = array();
|
||||
protected $_items = array();
|
||||
protected $_payments = array();
|
||||
|
||||
abstract public function export();
|
||||
|
||||
public function __get($key) {
|
||||
return $this->_data[$key];
|
||||
}
|
||||
|
||||
public function __set($key,$value) {
|
||||
$this->_data[$key] = $value;
|
||||
}
|
||||
|
||||
protected function keys() {
|
||||
return array_keys($this->_data);
|
||||
}
|
||||
|
||||
protected function vals() {
|
||||
return array_values($this->_data);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,69 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Quicken exporting capabilities.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Quicken extends OSBExport {
|
||||
protected $defaults = array();
|
||||
|
||||
protected function keys() {
|
||||
return array_merge(array_keys($this->defaults),parent::keys());
|
||||
}
|
||||
|
||||
protected function vals() {
|
||||
return array_merge(array_values($this->defaults),parent::vals());
|
||||
}
|
||||
|
||||
public function addInvoice(Quicken_Invoice $item) {
|
||||
array_push($this->_items,$item);
|
||||
}
|
||||
|
||||
public function export() {
|
||||
$export = '';
|
||||
|
||||
foreach ($this->_items as $inv) {
|
||||
# Invoices
|
||||
$export .= "!TRNS\t";
|
||||
$export .= implode("\t",$inv->keys())."\n";
|
||||
$export .= "TRNS\t";
|
||||
$export .= implode("\t",$inv->vals())."\n";
|
||||
|
||||
# Invoice Items
|
||||
$spl = 0;
|
||||
foreach ($inv->_items as $invitem) {
|
||||
if (! $spl) {
|
||||
$export .= "!SPL\tSPLID\t";
|
||||
$export .= implode("\t",$invitem->keys())."\n";
|
||||
}
|
||||
|
||||
$export .= sprintf("SPL\t%s\t%s",$spl++,implode("\t",$invitem->vals()))."\n";
|
||||
}
|
||||
|
||||
$export .= "ENDTRNS\n";
|
||||
|
||||
# Payments
|
||||
foreach ($inv->_payments as $payitem) {
|
||||
if (! $payitem->AMOUNT)
|
||||
continue;
|
||||
|
||||
$export .= "!TRNS\t";
|
||||
$export .= implode("\t",$payitem->keys())."\n";
|
||||
$export .= "TRNS\t";
|
||||
$export .= implode("\t",$payitem->vals())."\n";
|
||||
|
||||
$export .= sprintf("!SPL\t%s\t%s\t%s\t%s\t%s\t",'SPLID','TRANSTYPE','CLEAR','ACCNT','AMOUNT')."\n";
|
||||
$export .= sprintf("SPL\t%s\t%s\t%s\t%s\t%s\t",0,'PAYMENT','N','Accounts Receivable',$payitem->AMOUNT)."\n";
|
||||
$export .= "ENDTRNS\n";
|
||||
}
|
||||
}
|
||||
|
||||
return $export;
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,26 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Quicken exporting capabilities.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Quicken_Invoice extends Quicken {
|
||||
protected $defaults = array(
|
||||
'ACCNT'=>'Accounts Receivable',
|
||||
'TRNSTYPE'=>'TAX_INVOICE'
|
||||
);
|
||||
|
||||
public function addInvoiceItem(Quicken_InvoiceItem $item) {
|
||||
array_push($this->_items,$item);
|
||||
}
|
||||
|
||||
public function addPayment(Quicken_Payment $item) {
|
||||
array_push($this->_payments,$item);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -1,14 +0,0 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides Quicken exporting capabilities.
|
||||
*
|
||||
* @package Export
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Quicken_InvoiceItem extends Quicken {
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user