Cart work for payments and Paypal work to test
This commit is contained in:
@@ -156,7 +156,8 @@ class Model_Payment extends ORM_OSB {
|
||||
// Our items will be clobbered once we save the object, so we need to save it here.
|
||||
$items = $this->items();
|
||||
|
||||
$this->source_id = Auth::instance()->get_user()->id;
|
||||
// @todo This should not be mandatory - or there should be a source for non-users (automatic postings)
|
||||
$this->source_id = Auth::instance()->get_user() ? Auth::instance()->get_user()->id : 1;
|
||||
$this->ip = Request::$client_ip;
|
||||
|
||||
// Make sure we dont over allocate
|
||||
|
@@ -11,6 +11,13 @@
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Model_Payment_Item extends ORM_OSB {
|
||||
protected $_belongs_to = array('payment'=>array(),'invoice'=>array());
|
||||
// Relationships
|
||||
protected $_has_one = array(
|
||||
'invoice'=>array('far_key'=>'invoice_id','foreign_key'=>'id'),
|
||||
);
|
||||
|
||||
protected $_belongs_to = array(
|
||||
'payment'=>array(),
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user