Customer document updated

This commit is contained in:
Prashant Singh 2019-06-29 11:40:58 +05:30
parent d891fb108c
commit 04462c7212
4 changed files with 17 additions and 15 deletions

View File

@ -34,6 +34,5 @@ class CustomerDocumentRepository extends Repository
->whereIn('customer_id', [$id, 0])
->where('status', '1')
->get();
}
}

View File

@ -56,7 +56,7 @@
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
<label for="description">{{ __('customerdocument::app.admin.customers.description') }}</label>
<textarea class="control" id="description" name="description" data-vv-as="&quot;{{ __('customerdocument::app.admin.customers.description') }}&quot;" value="{{ old('description') }}"/
<textarea class="control" id="description" name="description" data-vv-as="&quot;{{ __('customerdocument::app.admin.customers.description') }}&quot;" value="{{ old('description') }}"
></textarea>
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>

View File

@ -58,10 +58,8 @@
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
<label for="description">{{ __('customerdocument::app.admin.customers.description') }}</label>
<textarea class="control" id="description" name="description" data-vv-as="&quot;{{ __('customerdocument::app.admin.customers.description') }}&quot;"/
>
{{ $document->description }}
</textarea>
<textarea class="control" id="description" name="description" data-vv-as="&quot;{{ __('customerdocument::app.admin.customers.description') }}&quot;"
>{{ $document->description }}</textarea>
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
</div>
@ -102,4 +100,4 @@
</form>
</div>
@stop
@stop

View File

@ -248,12 +248,12 @@ class StripeConnectController extends Controller
try {
$cart = Cart::getCart();
if(Cart::getCart()->base_currency_code == 'YEN' ||Cart::getCart()->base_currency_code == 'yen') {
if($cart->base_currency_code == 'YEN' ||$cart->base_currency_code == 'yen') {
$result = StripeCharge::create ([
"amount" => Cart::getCart()->base_grand_total,
"currency" => Cart::getCart()->base_currency_code,
"amount" => $cart->base_grand_total,
"currency" => $cart->base_currency_code,
"source" => $stripeToken,
"description" => "Purchased ".Cart::getCart()->items_count." items on ".config('app.name'),
"description" => "Purchased ".$cart->items_count." items on ".config('app.name'),
'application_fee_amount' => $applicationFee * 100,
'statement_descriptor' => $this->statementDescriptor,
], [
@ -265,10 +265,10 @@ class StripeConnectController extends Controller
$applicationFee = (0.029 * $applicationFee) + (0.02 * $applicationFee) + 0.3;
$result = StripeCharge::create([
"amount" => round(Cart::getCart()->base_grand_total, 2) * 100,
"currency" => Cart::getCart()->base_currency_code,
"amount" => round($cart->base_grand_total, 2) * 100,
"currency" => $cart->base_currency_code,
"source" => $stripeToken,
"description" => "Purchased ".Cart::getCart()->items_count." items on ".config('app.name'),
"description" => "Purchased ".$cart->items_count." items on ".config('app.name'),
'application_fee_amount' => round($applicationFee, 2) * 100,
'statement_descriptor' => $this->statementDescriptor,
], [
@ -279,8 +279,13 @@ class StripeConnectController extends Controller
$applicationFee = (0.029 * $applicationFee) + (0.02 * $applicationFee) + 0.3;
$applicationFee1 = 0.02 * ($applicationFee + $cart->base_grand_total12);
$cart->update([
'base_grand_total' => $cart->grand_total + $applicationFee,
'grand_total' => $cart->base_grand_total
]);
$result = StripeCharge::create([
"amount" => round(Cart::getCart()->base_grand_total, 2) * 100 + round($applicationFee, 2) * 100,
"amount" => round(Cart::getCart()->base_grand_total, 2) * 100,
"currency" => Cart::getCart()->base_currency_code,
"source" => $stripeToken,
"description" => "Purchased ".Cart::getCart()->items_count." items on ".config('app.name'),