-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update plapayments to use DummyPayment class with no payment file output
- Loading branch information
1 parent
7f29afc
commit efaca2d
Showing
9 changed files
with
210 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
modules/public_pages/erp/ledger/purchase_ledger/reports/DummyPayment.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
class DummyPayment | ||
{ | ||
public $testprint = FALSE; | ||
public $no_output = true; | ||
|
||
|
||
function setData() { | ||
return; | ||
} | ||
|
||
function constructPrint() { | ||
return true; | ||
} | ||
|
||
function validate($data, &$errors) | ||
{ | ||
|
||
$return = true; | ||
|
||
if (isset($data['PLTransaction'])) | ||
{ | ||
$progressbar = new Progressbar('checking_supplier_details'); | ||
|
||
$callback = function($unused, $supplier_id) use (&$errors) | ||
{ | ||
|
||
$supplier = DataObjectFactory::Factory('PLSupplier'); | ||
$supplier->load($supplier_id); | ||
|
||
if (!$supplier->isLoaded()) | ||
{ | ||
$errors[] = 'Error checking supplier'; | ||
return false; | ||
} | ||
|
||
|
||
}; | ||
|
||
$return = $progressbar->process($data['PLTransaction'], $callback); | ||
|
||
} | ||
|
||
return $return; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters