The customer will be paying the tip by cash.';
+ }
- break;
- }
+ break;
+ }
- return $msg;
- }
+ return $msg;
+ }
- public function phoeneticNumber($num) {
- $num = explode('.',$num);
- return $num[0].' dollar'.($num[0] == 1 ? '' : 's').' and '.$num[1].' cent'.($num[1] == '1' ? '' : 's');
- }
+ public function phoeneticNumber($num) {
+ $num = explode('.',$num);
+ return $num[0].' dollar'.($num[0] == 1 ? '' : 's').' and '.$num[1].' cent'.($num[1] == '1' ? '' : 's');
+ }
- public function exports() {
- $out = $this->properties();
- unset($out['id_user']);
- unset($out['id']);
- unset($out['id_order']);
+ public function exports() {
+ $out = $this->properties();
+ unset($out['id_user']);
+ unset($out['id']);
+ unset($out['id_order']);
- $out['user'] = $this->user()->uuid;
- $out['_message'] = nl2br($this->orderMessage('web'));
- return $out;
- }
+ $out['user'] = $this->user()->uuid;
+ $out['_message'] = nl2br($this->orderMessage('web'));
+ return $out;
+ }
- public function refund() {
- $env = c::env() == 'live' ? 'live' : 'dev';
- switch ($this->processor) {
- case 'stripe':
- default:
- Stripe::setApiKey(c::config()->stripe->{$env}->secret);
- $ch = Stripe_Charge::retrieve($this->txn);
- try {
- $ch->refund();
- } catch (Exception $e) {
- return false;
- }
- break;
+ public function refund() {
+ $env = c::env() == 'live' ? 'live' : 'dev';
+ switch ($this->processor) {
+ case 'stripe':
+ default:
+ Stripe::setApiKey(c::config()->stripe->{$env}->secret);
+ $ch = Stripe_Charge::retrieve($this->txn);
+ try {
+ $ch->refund();
+ } catch (Exception $e) {
+ return false;
+ }
+ break;
- case 'balanced':
- $ch = Crunchbutton_Balanced_Debit::byId($this->txn);
- try {
- $ch->refund();
- } catch (Exception $e) {
- return false;
- }
- break;
- }
+ case 'balanced':
+ $ch = Crunchbutton_Balanced_Debit::byId($this->txn);
+ try {
+ $ch->refund();
+ } catch (Exception $e) {
+ return false;
+ }
+ break;
+ }
- $this->refunded = 1;
- $this->save();
- return true;
- }
+ $this->refunded = 1;
+ $this->save();
+ return true;
+ }
- public function phone() {
- $phone = $this->phone;
- $phone = preg_replace('/[^\d]*/i','',$phone);
- $phone = preg_replace('/(\d{3})(\d{3})(.*)/', '\\1-\\2-\\3', $phone);
+ public function phone() {
+ $phone = $this->phone;
+ $phone = preg_replace('/[^\d]*/i','',$phone);
+ $phone = preg_replace('/(\d{3})(\d{3})(.*)/', '\\1-\\2-\\3', $phone);
- return $phone;
- }
+ return $phone;
+ }
- public function community() {
- return Community::o($this->id_community);
- }
+ public function community() {
+ return Community::o($this->id_community);
+ }
- public function __construct($id = null) {
- parent::__construct();
- $this
- ->table('order')
- ->idVar('id_order')
- ->load($id);
- }
+ public function __construct($id = null) {
+ parent::__construct();
+ $this
+ ->table('order')
+ ->idVar('id_order')
+ ->load($id);
+ }
}
\ No newline at end of file
diff --git a/www/assets/js/app.js b/www/assets/js/app.js
index d726a2260..34d3a9e76 100644
--- a/www/assets/js/app.js
+++ b/www/assets/js/app.js
@@ -318,7 +318,7 @@ App.page.restaurant = function(id) {
if (App.config.user.delivery_type == 'delivery' && App.restaurant.delivery == '1') {
dp.append('
' + (App.config.user.address ? App.config.user.address.replace("\n",'
') : 'no address provided') + '
');
} else {
- dp.append(' takeout
');
+ dp.append(' takeout
');
}
dp.append('');
@@ -391,7 +391,7 @@ App.drawPay = function(restaurant)
'' +
'' +
- '' +
+ '' +
'' +
fieldError +
'' +