Merge branch '159-general-fixes-and-tweaking' into 'master'
Resolve "General fixes and tweaking" Closes #159 See merge request jankstudio/resq!162
This commit is contained in:
commit
1f806fb401
1 changed files with 8 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ use App\Ramcar\APIRiderStatus;
|
|||
use App\Ramcar\TransactionOrigin;
|
||||
use App\Ramcar\TradeInType;
|
||||
use App\Ramcar\InvoiceStatus;
|
||||
use App\Ramcar\ModeOfPayment;
|
||||
|
||||
use App\Service\InvoiceCreator;
|
||||
use App\Service\MQTTClient;
|
||||
|
|
@ -732,6 +733,13 @@ class RAPIController extends Controller
|
|||
if (!TradeInType::validate($trade_in))
|
||||
$trade_in = null;
|
||||
|
||||
// check mode of payment
|
||||
$mode = $req->request->get('mode_of_payment');
|
||||
if (!ModeOfPayment::validate($mode))
|
||||
$mode = ModeOfPayment::CASH;
|
||||
$jo->setModeOfPayment($mode);
|
||||
|
||||
|
||||
// generate new invoice
|
||||
$crit = new InvoiceCriteria();
|
||||
$crit->setServiceType($stype_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue