Added confirmation page, and more importantly date and comment settings, when reversing a charge.
git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@598 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -185,6 +185,9 @@ class StatementEntry extends AppModel {
|
||||
function reversable($id) {
|
||||
$this->prEnter(compact('id'));
|
||||
|
||||
if (empty($id))
|
||||
return $this->prReturn(false);
|
||||
|
||||
// Verify the item is an actual charge
|
||||
$this->id = $id;
|
||||
$charge_type = $this->field('type');
|
||||
@@ -205,7 +208,7 @@ class StatementEntry extends AppModel {
|
||||
* function: reverse
|
||||
* - Reverses the charges
|
||||
*/
|
||||
function reverse($id, $stamp = null) {
|
||||
function reverse($id, $stamp = null, $comment) {
|
||||
$this->prEnter(compact('id', 'stamp'));
|
||||
|
||||
// Verify the item can be reversed
|
||||
@@ -222,7 +225,7 @@ class StatementEntry extends AppModel {
|
||||
|
||||
// Record the reversal transaction
|
||||
$result = $this->Transaction->addReversal
|
||||
($charge, $stamp, 'Charge Reversal');
|
||||
($charge, $stamp, $comment ? $comment : 'Charge Reversal');
|
||||
|
||||
if (empty($result['error'])) {
|
||||
// Mark the charge as reversed
|
||||
|
||||
Reference in New Issue
Block a user