diff --git a/app/Entities/Payments/PaymentPresenter.php b/app/Entities/Payments/PaymentPresenter.php
index c086fe4..25a13d4 100644
--- a/app/Entities/Payments/PaymentPresenter.php
+++ b/app/Entities/Payments/PaymentPresenter.php
@@ -8,7 +8,7 @@ class PaymentPresenter extends Presenter
{
public function amount()
{
- return $this->entity->in_out == 0 ? formatRp(-$this->entity->amount) : formatRp($this->entity->amount);
+ return $this->entity->in_out == 0 ? format_money(-$this->entity->amount) : format_money($this->entity->amount);
}
public function projectLink()
diff --git a/app/helpers.php b/app/helpers.php
index cb40161..6894fa1 100755
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -13,10 +13,11 @@ function formatNo($number)
/**
* Get number in money currency format.
+ *
* @param int|string $number
* @return string
*/
-function formatRp($number)
+function format_money($number)
{
$moneySign = Option::get('money_sign', 'Rp.');
diff --git a/resources/views/customers/invoices.blade.php b/resources/views/customers/invoices.blade.php
index b866f81..f92b869 100755
--- a/resources/views/customers/invoices.blade.php
+++ b/resources/views/customers/invoices.blade.php
@@ -22,7 +22,7 @@
{{ $invoice->created_at->format('Y-m-d') }} |
{{ $invoice->project->nameLink() }} |
{{ $invoice->project->customer->nameLink() }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
{!! html_link_to_route(
'invoices.show', '', [$invoice->number],
@@ -49,7 +49,7 @@
|
| {{ trans('app.total') }} |
- {{ formatRp($invoices->sum('amount')) }} |
+ {{ format_money($invoices->sum('amount')) }} |
|
diff --git a/resources/views/customers/payments.blade.php b/resources/views/customers/payments.blade.php
index 38364f8..66a584d 100755
--- a/resources/views/customers/payments.blade.php
+++ b/resources/views/customers/payments.blade.php
@@ -42,7 +42,7 @@
| {{ __('app.total') }} |
- {{ formatRp($payments->sum('amount')) }} |
+ {{ format_money($payments->sum('amount')) }} |
|
diff --git a/resources/views/customers/projects.blade.php b/resources/views/customers/projects.blade.php
index c426a79..c7eaa7b 100755
--- a/resources/views/customers/projects.blade.php
+++ b/resources/views/customers/projects.blade.php
@@ -21,7 +21,7 @@
{{ $project->nameLink() }} |
{{ $project->start_date }} |
{{ $project->work_duration }} |
- {{ formatRp($project->project_value) }} |
+ {{ format_money($project->project_value) }} |
{{ $project->present()->status }} |
{!! html_link_to_route('projects.show', '', [$project->id], ['icon' => 'search', 'class' => 'btn btn-info btn-xs', 'title' => trans('app.show')]) !!}
diff --git a/resources/views/customers/subscriptions.blade.php b/resources/views/customers/subscriptions.blade.php
index bc35479..96271c9 100755
--- a/resources/views/customers/subscriptions.blade.php
+++ b/resources/views/customers/subscriptions.blade.php
@@ -26,7 +26,7 @@
|
{{ date_id($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!}
|
- {{ formatRp($subscription->price) }} |
+ {{ format_money($subscription->price) }} |
{{ $subscription->vendor->name }} |
{{ $subscription->status() }} |
diff --git a/resources/views/invoice-drafts/partials/draft-confirm.blade.php b/resources/views/invoice-drafts/partials/draft-confirm.blade.php
index a8fbef3..eaef2f7 100644
--- a/resources/views/invoice-drafts/partials/draft-confirm.blade.php
+++ b/resources/views/invoice-drafts/partials/draft-confirm.blade.php
@@ -18,7 +18,7 @@
| {{ trans('invoice.due_date') }} | {{ $draft->dueDate }} |
| {{ trans('invoice.total') }} |
- {{ formatRp($draft->getTotal()) }} |
+ {{ format_money($draft->getTotal()) }} |
| {{ trans('invoice.notes') }} | {{ $draft->notes }} |
@@ -48,7 +48,7 @@
| {{ $key + 1 }} |
{!! nl2br($item->description) !!} |
- {{ formatRp($item->amount) }} |
+ {{ format_money($item->amount) }} |
@empty
@endforelse
@@ -56,7 +56,7 @@
| {{ trans('invoice.total') }} : |
- {{ formatRp($draft->getTotal()) }} |
+ {{ format_money($draft->getTotal()) }} |
diff --git a/resources/views/invoice-drafts/partials/draft-item-list.blade.php b/resources/views/invoice-drafts/partials/draft-item-list.blade.php
index 65f8217..eadf7f5 100644
--- a/resources/views/invoice-drafts/partials/draft-item-list.blade.php
+++ b/resources/views/invoice-drafts/partials/draft-item-list.blade.php
@@ -51,7 +51,7 @@
@endforeach
| {{ trans('invoice.amount') }} : |
- {{ formatRp($draft->getTotal()) }} |
+ {{ format_money($draft->getTotal()) }} |
|
diff --git a/resources/views/invoices/index.blade.php b/resources/views/invoices/index.blade.php
index b6c6f95..7a48368 100755
--- a/resources/views/invoices/index.blade.php
+++ b/resources/views/invoices/index.blade.php
@@ -34,7 +34,7 @@
| {{ $invoice->created_at->format('Y-m-d') }} |
{{ $invoice->project->nameLink() }} |
{{ $invoice->project->customer->nameLink() }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
{!! html_link_to_route(
'invoices.show', '', [$invoice->number],
@@ -61,7 +61,7 @@
|
| {{ trans('app.total') }} |
- {{ formatRp($invoices->sum('amount')) }} |
+ {{ format_money($invoices->sum('amount')) }} |
|
diff --git a/resources/views/invoices/partials/detail.blade.php b/resources/views/invoices/partials/detail.blade.php
index eed4668..d613565 100644
--- a/resources/views/invoices/partials/detail.blade.php
+++ b/resources/views/invoices/partials/detail.blade.php
@@ -7,6 +7,6 @@
| {{ trans('invoice.customer') }} | {{ $invoice->project->customer->nameLink() }} |
| {{ trans('invoice.items_count') }} | {{ $invoice->items_count }} |
| {{ trans('invoice.creator') }} | {{ $invoice->creator->name }} |
- | {{ trans('invoice.amount') }} | {{ formatRp($invoice->amount) }} |
+ | {{ trans('invoice.amount') }} | {{ format_money($invoice->amount) }} |
diff --git a/resources/views/invoices/partials/item-list.blade.php b/resources/views/invoices/partials/item-list.blade.php
index 7834873..5f3d09d 100644
--- a/resources/views/invoices/partials/item-list.blade.php
+++ b/resources/views/invoices/partials/item-list.blade.php
@@ -77,7 +77,7 @@
| {{ trans('invoice.amount') }} : |
- {{ formatRp(collect($invoice->items)->sum('amount')) }} |
+ {{ format_money(collect($invoice->items)->sum('amount')) }} |
|
diff --git a/resources/views/invoices/pdf.blade.php b/resources/views/invoices/pdf.blade.php
index 30b9003..004a517 100755
--- a/resources/views/invoices/pdf.blade.php
+++ b/resources/views/invoices/pdf.blade.php
@@ -114,7 +114,7 @@
| {{ 1 + $key }} |
{!! nl2br($item['description']) !!} |
- {{ formatRp($item['amount']) }} |
+ {{ format_money($item['amount']) }} |
@php
$subtotal += $item['amount'];
@@ -123,19 +123,19 @@
@if ($invoice->discount)
| {{ __('invoice.subtotal') }} : |
- {{ formatRp($subtotal) }} |
+ {{ format_money($subtotal) }} |
|
{{ __('invoice.discount') }}
{{ $invoice->discount_notes ? '('.$invoice->discount_notes.')': '' }} :
|
- - {{ formatRp($invoice->discount) }} |
+ - {{ format_money($invoice->discount) }} |
@endif
| {{ __('app.total') }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
diff --git a/resources/views/invoices/show.blade.php b/resources/views/invoices/show.blade.php
index d0737b5..f96b3fc 100644
--- a/resources/views/invoices/show.blade.php
+++ b/resources/views/invoices/show.blade.php
@@ -39,7 +39,7 @@
| {{ $key + 1 }} |
{!! nl2br($item['description']) !!} |
- {{ formatRp($item['amount']) }} |
+ {{ format_money($item['amount']) }} |
@php
$subtotal += $item['amount'];
@@ -50,19 +50,19 @@
@if ($invoice->discount)
| {{ __('invoice.subtotal') }} : |
- {{ formatRp($subtotal) }} |
+ {{ format_money($subtotal) }} |
|
{{ __('invoice.discount') }}
{{ $invoice->discount_notes ? '('.$invoice->discount_notes.')': '' }} :
|
- - {{ formatRp($invoice->discount) }} |
+ - {{ format_money($invoice->discount) }} |
@endif
| {{ trans('app.total') }} : |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
diff --git a/resources/views/jobs/partials/job-show.blade.php b/resources/views/jobs/partials/job-show.blade.php
index 3574e19..8f983a7 100644
--- a/resources/views/jobs/partials/job-show.blade.php
+++ b/resources/views/jobs/partials/job-show.blade.php
@@ -5,7 +5,7 @@
| {{ __('job.name') }} | {{ $job->name }} |
| {{ __('job.type') }} | {{ $job->type() }} |
@can('see-pricings', $job)
- | {{ __('job.price') }} | {{ formatRp($job->price) }} |
+ | {{ __('job.price') }} | {{ format_money($job->price) }} |
@endcan
| {{ __('job.progress') }} | {{ format_decimal($job->progress) }}% |
| {{ __('job.worker') }} | {{ $job->worker->name }} |
diff --git a/resources/views/jobs/unfinished.blade.php b/resources/views/jobs/unfinished.blade.php
index 1f4d86f..8d31f01 100755
--- a/resources/views/jobs/unfinished.blade.php
+++ b/resources/views/jobs/unfinished.blade.php
@@ -48,7 +48,7 @@
{{ $job->tasks_count = $job->tasks->count() }} |
{{ format_decimal($job->progress) }} % |
@can('see-pricings', $job)
- {{ formatRp($job->price) }} |
+ {{ format_money($job->price) }} |
@endcan
{{ $job->worker->name }} |
@@ -65,7 +65,7 @@
| {{ $jobs->sum('tasks_count') }} |
{{ format_decimal($jobs->avg('progress')) }} % |
@can('see-pricings', new App\Entities\Projects\Job)
- {{ formatRp($jobs->sum('price')) }} |
+ {{ format_money($jobs->sum('price')) }} |
@endcan
|
diff --git a/resources/views/options/page-1.blade.php b/resources/views/options/page-1.blade.php
index 6d0a1b8..58729c9 100755
--- a/resources/views/options/page-1.blade.php
+++ b/resources/views/options/page-1.blade.php
@@ -17,7 +17,7 @@
['class' => 'form-control', 'maxlength' => 3]
) }}
- Money sign like : {{ formatRp('9900') }}
(Max 3 characters)
+ Money sign like : {{ format_money('9900') }}
(Max 3 characters)
diff --git a/resources/views/pages/home.blade.php b/resources/views/pages/home.blade.php
index 6bdbf4a..8f930d4 100755
--- a/resources/views/pages/home.blade.php
+++ b/resources/views/pages/home.blade.php
@@ -32,13 +32,13 @@
|
- {{ $totalEarnings = formatRp(AdminDashboard::totalEarnings($queriedYear)) }}
+ {{ $totalEarnings = format_money(AdminDashboard::totalEarnings($queriedYear)) }}
|
{{ $totalFinishedProjects = AdminDashboard::totalFinishedProjects($queriedYear) }} Projects
|
- {{ $currentOutstandingCustomerPayment = formatRp(AdminDashboard::currentOutstandingCustomerPayment($queriedYear)) }}
+ {{ $currentOutstandingCustomerPayment = format_money(AdminDashboard::currentOutstandingCustomerPayment($queriedYear)) }}
|
@@ -73,7 +73,7 @@
| {{ $subscription->nameLink() }} |
{{ $subscription->customer->name }} |
- {{ formatRp($subscription->price) }} |
+ {{ format_money($subscription->price) }} |
{{ $subscription->due_date }}
{!! $subscription->nearOfDueDateSign() !!}
diff --git a/resources/views/payments/pdf.blade.php b/resources/views/payments/pdf.blade.php
index 6680e20..9131635 100755
--- a/resources/views/payments/pdf.blade.php
+++ b/resources/views/payments/pdf.blade.php
@@ -69,7 +69,7 @@
|
| @lang('payment.cash_amount') |
- {{ formatRp($payment->amount) }},-
+ {{ format_money($payment->amount) }},-
|
{{ auth()->user()->name }}
diff --git a/resources/views/projects/index.blade.php b/resources/views/projects/index.blade.php
index 7b7aa6a..df9c6e8 100755
--- a/resources/views/projects/index.blade.php
+++ b/resources/views/projects/index.blade.php
@@ -48,7 +48,7 @@
| {{ $project->due_date }} |
@endif
@can('see-pricings', new App\Entities\Projects\Project)
- {{ formatRp($project->project_value) }} |
+ {{ format_money($project->project_value) }} |
@endcan
{{ $project->present()->status }} |
{{ $project->customer->name }} |
diff --git a/resources/views/projects/invoices.blade.php b/resources/views/projects/invoices.blade.php
index a6b12d2..7f46d50 100755
--- a/resources/views/projects/invoices.blade.php
+++ b/resources/views/projects/invoices.blade.php
@@ -40,7 +40,7 @@
{{ $invoice->date }} |
{{ $invoice->due_date }} |
{{ $project->customer->nameLink() }} |
- {{ formatRp($invoice->amount) }} |
+ {{ format_money($invoice->amount) }} |
{!! html_link_to_route(
'invoices.show', '', [$invoice->number],
@@ -68,7 +68,7 @@
|
| {{ trans('app.total') }} |
- {{ formatRp($project->invoices->sum('amount')) }} |
+ {{ format_money($project->invoices->sum('amount')) }} |
|
diff --git a/resources/views/projects/jobs/export-html.blade.php b/resources/views/projects/jobs/export-html.blade.php
index 164d815..80bc2e1 100755
--- a/resources/views/projects/jobs/export-html.blade.php
+++ b/resources/views/projects/jobs/export-html.blade.php
@@ -52,14 +52,14 @@
| {{ 1 + $key }} |
{{ $job->name }} |
- {{ formatRp($job->price) }} |
+ {{ format_money($job->price) }} |
@endforeach
| Total |
- {{ formatRp($jobs->sum('price')) }} |
+ {{ format_money($jobs->sum('price')) }} |
diff --git a/resources/views/projects/jobs/index.blade.php b/resources/views/projects/jobs/index.blade.php
index 0b724b6..3e13ffb 100755
--- a/resources/views/projects/jobs/index.blade.php
+++ b/resources/views/projects/jobs/index.blade.php
@@ -84,7 +84,7 @@
{{ $job->tasks_count = $job->tasks->count() }} |
{{ format_decimal($job->progress) }} % |
@can('see-pricings', $job)
- {{ formatRp($job->price) }} |
+ {{ format_money($job->price) }} |
@endcan
{{ $job->updated_at->diffForHumans() }}
@@ -112,7 +112,7 @@
({{ format_decimal($project->getJobOveralProgress()) }} %)
@can('see-pricings', new App\Entities\Projects\Job)
- | {{ formatRp($groupedJobs->sum('price')) }} |
+ {{ format_money($groupedJobs->sum('price')) }} |
@endcan
@can('update', $project)
diff --git a/resources/views/projects/jobs/progress-export-html.blade.php b/resources/views/projects/jobs/progress-export-html.blade.php
index f1c78fa..7fe80fb 100755
--- a/resources/views/projects/jobs/progress-export-html.blade.php
+++ b/resources/views/projects/jobs/progress-export-html.blade.php
@@ -30,18 +30,18 @@
|
| {{ 1 + $key }} |
{{ $job->name }} |
- {{ formatRp($job->price) }} |
+ {{ format_money($job->price) }} |
{{ format_decimal($job->progress) }} % |
- {{ formatRp($job->receiveable_earning) }} |
+ {{ format_money($job->receiveable_earning) }} |
@endforeach
| {{ __('app.total') }} |
- {{ formatRp($jobs->sum('price')) }} |
+ {{ format_money($jobs->sum('price')) }} |
{{ format_decimal($project->getJobOveralProgress()) }} % |
- {{ formatRp($jobs->sum('receiveable_earning')) }} |
+ {{ format_money($jobs->sum('receiveable_earning')) }} |
diff --git a/resources/views/projects/partials/payment-summary.blade.php b/resources/views/projects/partials/payment-summary.blade.php
index 8c4f410..1733a78 100644
--- a/resources/views/projects/partials/payment-summary.blade.php
+++ b/resources/views/projects/partials/payment-summary.blade.php
@@ -8,19 +8,19 @@
{{ trans('project.payment_status') }} |
- | {{ formatRp($project->project_value) }} |
- {{ formatRp($project->cashInTotal()) }} |
- {{ formatRp($project->cashOutTotal()) }} |
- {{ formatRp($balance = $project->project_value - $project->cashInTotal()) }} |
+ {{ format_money($project->project_value) }} |
+ {{ format_money($project->cashInTotal()) }} |
+ {{ format_money($project->cashOutTotal()) }} |
+ {{ format_money($balance = $project->project_value - $project->cashInTotal()) }} |
{{ $balance > 0 ? trans('project.payment_statuses.outstanding') : trans('project.payment_statuses.paid') }} |
- - {{ trans('project.project_value') }} {{ formatRp($project->project_value) }}
- - {{ trans('project.cash_in_total') }} {{ formatRp($project->cashInTotal()) }}
- - {{ trans('project.cash_out_total') }} {{ formatRp($project->cashOutTotal()) }}
- - {{ trans('project.payment_remaining') }} {{ formatRp($balance = $project->project_value - $project->cashInTotal()) }}
+ - {{ trans('project.project_value') }} {{ format_money($project->project_value) }}
+ - {{ trans('project.cash_in_total') }} {{ format_money($project->cashInTotal()) }}
+ - {{ trans('project.cash_out_total') }} {{ format_money($project->cashOutTotal()) }}
+ - {{ trans('project.payment_remaining') }} {{ format_money($balance = $project->project_value - $project->cashInTotal()) }}
- {{ trans('project.payment_status') }} {{ $balance > 0 ? trans('project.payment_statuses.outstanding') : trans('project.payment_statuses.paid') }}
diff --git a/resources/views/projects/partials/project-show.blade.php b/resources/views/projects/partials/project-show.blade.php
index ad8e058..a2d6ea0 100644
--- a/resources/views/projects/partials/project-show.blade.php
+++ b/resources/views/projects/partials/project-show.blade.php
@@ -7,8 +7,8 @@
| {{ trans('project.description') }} | {!! nl2br($project->description) !!} |
| {{ trans('project.proposal_date') }} | {{ date_id($project->proposal_date) }} |
@can('see-pricings', $project)
- | {{ trans('project.proposal_value') }} | {{ formatRp($project->proposal_value) }} |
- | {{ trans('project.project_value') }} | {{ formatRp($project->project_value) }} |
+ | {{ trans('project.proposal_value') }} | {{ format_money($project->proposal_value) }} |
+ | {{ trans('project.project_value') }} | {{ format_money($project->project_value) }} |
@endcan
| {{ trans('project.start_date') }} | {{ date_id($project->start_date) }} |
| {{ trans('project.end_date') }} | {{ date_id($project->end_date) }} |
diff --git a/resources/views/projects/partials/project-stats.blade.php b/resources/views/projects/partials/project-stats.blade.php
index 75194b6..767ab85 100644
--- a/resources/views/projects/partials/project-stats.blade.php
+++ b/resources/views/projects/partials/project-stats.blade.php
@@ -38,7 +38,7 @@
Collectibe Earnings
-
{{ formatRp($project->getCollectibeEarnings()) }}
+
{{ format_money($project->getCollectibeEarnings()) }}
diff --git a/resources/views/projects/payments.blade.php b/resources/views/projects/payments.blade.php
index 923162e..59d61d0 100755
--- a/resources/views/projects/payments.blade.php
+++ b/resources/views/projects/payments.blade.php
@@ -36,7 +36,7 @@
| {{ 1 + $key }} |
{{ $payment->date }} |
- {{ formatRp($payment->amount) }} |
+ {{ format_money($payment->amount) }} |
{{ $payment->partner->name }} |
{{ $payment->description }} [{{ $payment->type() }}] |
@@ -53,7 +53,7 @@
|
| {{ trans('app.total') }} |
- {{ formatRp($payments->sum('amount')) }} |
+ {{ format_money($payments->sum('amount')) }} |
|
diff --git a/resources/views/projects/subscriptions.blade.php b/resources/views/projects/subscriptions.blade.php
index a74418e..29e1e35 100755
--- a/resources/views/projects/subscriptions.blade.php
+++ b/resources/views/projects/subscriptions.blade.php
@@ -33,7 +33,7 @@
{{ $subscription->nameLink() }} |
{{ date_id($subscription->start_date) }} |
{{ date_id($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!} |
- {{ formatRp($subscription->price) }} |
+ {{ format_money($subscription->price) }} |
{!! link_to_route('subscriptions.show',trans('app.show'),[$subscription->id],['class'=>'btn btn-info btn-xs']) !!}
{!! link_to_route('subscriptions.edit',trans('app.edit'),[$subscription->id],['class'=>'btn btn-warning btn-xs']) !!}
diff --git a/resources/views/reports/current-credits.blade.php b/resources/views/reports/current-credits.blade.php
index b5bf46b..be2e2a9 100644
--- a/resources/views/reports/current-credits.blade.php
+++ b/resources/views/reports/current-credits.blade.php
@@ -23,9 +23,9 @@
|
| {{ 1 + $key }} |
{!! link_to_route('projects.payments', $project->name, [$project->id], ['title' => __('project.view_payments'), 'target' => '_blank']) !!} |
- {{ formatRp($project->project_value) }} |
- {{ formatRp($project->cashInTotal()) }} |
- {{ formatRp($project->balance = $project->project_value - $project->cashInTotal()) }} |
+ {{ format_money($project->project_value) }} |
+ {{ format_money($project->cashInTotal()) }} |
+ {{ format_money($project->balance = $project->project_value - $project->cashInTotal()) }} |
{{ $project->customer->name }} |
{{ $project->present()->status }} |
@@ -36,7 +36,7 @@
| {{ __('app.total') }} |
- {{ formatRp($projects->sum('balance')) }} |
+ {{ format_money($projects->sum('balance')) }} |
|
diff --git a/resources/views/reports/payments/daily.blade.php b/resources/views/reports/payments/daily.blade.php
index 89a9809..a277da3 100755
--- a/resources/views/reports/payments/daily.blade.php
+++ b/resources/views/reports/payments/daily.blade.php
@@ -67,7 +67,7 @@
| {{ __('app.total') }} |
- {{ formatRp($total) }} |
+ {{ format_money($total) }} |
|
diff --git a/resources/views/reports/payments/monthly.blade.php b/resources/views/reports/payments/monthly.blade.php
index 7345caa..13b947e 100755
--- a/resources/views/reports/payments/monthly.blade.php
+++ b/resources/views/reports/payments/monthly.blade.php
@@ -50,9 +50,9 @@
| {{ date_id($date = $year.'-'.$month.'-'.$dateNumber) }} |
{{ $count }} |
- {{ formatRp($any ? $reports[$dateNumber]->cashin : 0) }} |
- {{ formatRp($any ? $reports[$dateNumber]->cashout : 0) }} |
- {{ formatRp($profit) }} |
+ {{ format_money($any ? $reports[$dateNumber]->cashin : 0) }} |
+ {{ format_money($any ? $reports[$dateNumber]->cashout : 0) }} |
+ {{ format_money($profit) }} |
{{ link_to_route(
'reports.payments.daily',
@@ -75,9 +75,9 @@
|
| {{ __('app.total') }} |
{{ $reports->sum('count') }} |
- {{ formatRp($reports->sum('cashin')) }} |
- {{ formatRp($reports->sum('cashout')) }} |
- {{ formatRp($reports->sum('profit')) }} |
+ {{ format_money($reports->sum('cashin')) }} |
+ {{ format_money($reports->sum('cashout')) }} |
+ {{ format_money($reports->sum('profit')) }} |
|
diff --git a/resources/views/reports/payments/yearly.blade.php b/resources/views/reports/payments/yearly.blade.php
index d9209bf..ca28dd9 100755
--- a/resources/views/reports/payments/yearly.blade.php
+++ b/resources/views/reports/payments/yearly.blade.php
@@ -44,9 +44,9 @@
| {{ month_id($monthNumber) }} |
{{ $any ? $reports[$monthNumber]->count : 0 }} |
- {{ formatRp($any ? $reports[$monthNumber]->cashin : 0) }} |
- {{ formatRp($any ? $reports[$monthNumber]->cashout : 0) }} |
- {{ formatRp($profit = $any ? $reports[$monthNumber]->profit : 0) }} |
+ {{ format_money($any ? $reports[$monthNumber]->cashin : 0) }} |
+ {{ format_money($any ? $reports[$monthNumber]->cashout : 0) }} |
+ {{ format_money($profit = $any ? $reports[$monthNumber]->profit : 0) }} |
{{ link_to_route(
'reports.payments.monthly',
@@ -69,9 +69,9 @@
|
| {{ trans('app.total') }} |
{{ $reports->sum('count') }} |
- {{ formatRp($reports->sum('cashin')) }} |
- {{ formatRp($reports->sum('cashout')) }} |
- {{ formatRp($reports->sum('profit')) }} |
+ {{ format_money($reports->sum('cashin')) }} |
+ {{ format_money($reports->sum('cashout')) }} |
+ {{ format_money($reports->sum('profit')) }} |
|
diff --git a/resources/views/subscriptions/index.blade.php b/resources/views/subscriptions/index.blade.php
index 7f077c5..2d0fdda 100755
--- a/resources/views/subscriptions/index.blade.php
+++ b/resources/views/subscriptions/index.blade.php
@@ -36,7 +36,7 @@
{{ date_id($subscription->due_date) }} {!! $subscription->nearOfDueDateSign() !!}
|
- {{ formatRp($subscription->price) }} |
+ {{ format_money($subscription->price) }} |
{{ $subscription->vendor->name }} |
{{ $subscription->status() }} |
diff --git a/resources/views/subscriptions/partials/subscription-show.blade.php b/resources/views/subscriptions/partials/subscription-show.blade.php
index 89c6866..7d4f422 100644
--- a/resources/views/subscriptions/partials/subscription-show.blade.php
+++ b/resources/views/subscriptions/partials/subscription-show.blade.php
@@ -1,7 +1,7 @@
| {{ trans('subscription.name') }} | {{ $subscription->name }} |
- | {{ trans('subscription.price') }} | {{ formatRp($subscription->price) }} |
+ | {{ trans('subscription.price') }} | {{ format_money($subscription->price) }} |
| {{ trans('subscription.type') }} | {{ $subscription->type }} |
| {{ trans('subscription.start_date') }} | {{ date_id($subscription->start_date) }} |
| {{ trans('subscription.due_date') }} | {{ date_id($subscription->due_date) }} |
diff --git a/resources/views/users/jobs.blade.php b/resources/views/users/jobs.blade.php
index e61b9e2..682875d 100755
--- a/resources/views/users/jobs.blade.php
+++ b/resources/views/users/jobs.blade.php
@@ -34,7 +34,7 @@
{{ $job->tasks_count = $job->tasks->count() }} |
{{ format_decimal($job->progress = $job->progress) }} % |
- {{ formatRp($job->price) }} |
+ {{ format_money($job->price) }} |
{!! html_link_to_route('jobs.show', '', [$job], [
'icon' => 'search',
diff --git a/resources/views/users/projects.blade.php b/resources/views/users/projects.blade.php
index 34e1075..9c625d2 100755
--- a/resources/views/users/projects.blade.php
+++ b/resources/views/users/projects.blade.php
@@ -30,7 +30,7 @@
| {{ $project->nameLink() }} |
{{ $project->start_date }} |
{{ $project->work_duration }} |
- {{ formatRp($project->project_value) }} |
+ {{ format_money($project->project_value) }} |
{{ $project->present()->status }} |
{{ $project->customer->name }} |
diff --git a/resources/views/vendors/show.blade.php b/resources/views/vendors/show.blade.php
index 953dc32..1f0db62 100755
--- a/resources/views/vendors/show.blade.php
+++ b/resources/views/vendors/show.blade.php
@@ -44,7 +44,7 @@
| {{ 1 + $key }} |
{{ $payment->project->name }} |
{{ $payment->date }} |
- {{ formatRp($payment->amount) }} |
+ {{ format_money($payment->amount) }} |
{{ $payment->description }} |
@endforeach
@@ -52,7 +52,7 @@
| {{ __('app.total') }} |
- {{ formatRp($vendor->payments->sum('amount')) }} |
+ {{ format_money($vendor->payments->sum('amount')) }} |
|
diff --git a/tests/Feature/Invoices/InvoiceEntryTest.php b/tests/Feature/Invoices/InvoiceEntryTest.php
index b635e7b..0401c98 100644
--- a/tests/Feature/Invoices/InvoiceEntryTest.php
+++ b/tests/Feature/Invoices/InvoiceEntryTest.php
@@ -87,7 +87,7 @@ class InvoiceEntryTest extends TestCase
$this->seePageIs(route('invoice-drafts.show', $draft->draftKey));
$this->assertEquals(5000, $draft->getTotal());
- $this->see(formatRp(5000));
+ $this->see(format_money(5000));
}
/** @test */
@@ -137,7 +137,7 @@ class InvoiceEntryTest extends TestCase
$this->assertEquals(200, $draft->getTotal());
- $this->see(formatRp($draft->getTotal()));
+ $this->see(format_money($draft->getTotal()));
}
/** @test */
@@ -174,7 +174,7 @@ class InvoiceEntryTest extends TestCase
$this->see($project->name);
$this->see($project->customer->name);
$this->see($draft->notes);
- $this->see(formatRp(3000));
+ $this->see(format_money(3000));
$this->seeElement('input', ['id' => 'save-invoice-draft']);
}
diff --git a/tests/Feature/ManageJobsTest.php b/tests/Feature/ManageJobsTest.php
index c9972d9..a5aa6e2 100644
--- a/tests/Feature/ManageJobsTest.php
+++ b/tests/Feature/ManageJobsTest.php
@@ -142,7 +142,7 @@ class ManageJobsTest extends TestCase
$this->seePageIs(route('jobs.show', $project->id));
$this->see(trans('job.detail'));
$this->see($job->name);
- $this->see(formatRp($job->price));
+ $this->see(format_money($job->price));
$this->see($job->worker->name);
}
diff --git a/tests/Feature/ManageSubscriptionsTest.php b/tests/Feature/ManageSubscriptionsTest.php
index 69ebaf6..8046f58 100644
--- a/tests/Feature/ManageSubscriptionsTest.php
+++ b/tests/Feature/ManageSubscriptionsTest.php
@@ -111,7 +111,7 @@ class ManageSubscriptionsTest extends TestCase
$this->visit(route('subscriptions.show', $subscription->id));
$this->see($subscription->name);
- $this->see(formatRp($subscription->price));
+ $this->see(format_money($subscription->price));
$this->see(date_id($subscription->start_date));
$this->see(date_id($subscription->due_date));
}
diff --git a/tests/Feature/Payments/ManagePaymentsTest.php b/tests/Feature/Payments/ManagePaymentsTest.php
index 9d0133b..8f2cbdc 100644
--- a/tests/Feature/Payments/ManagePaymentsTest.php
+++ b/tests/Feature/Payments/ManagePaymentsTest.php
@@ -216,7 +216,7 @@ class ManagePaymentsTest extends TestCase
$this->seePageIs(route('payments.show', $payment->id));
$this->see(trans('payment.detail'));
$this->see($payment->date);
- $this->see(formatRp($payment->amount));
+ $this->see(format_money($payment->amount));
$this->see($payment->description);
$this->see($payment->partner->name);
}
diff --git a/tests/Unit/Helpers/MoneyFormatTest.php b/tests/Unit/Helpers/MoneyFormatTest.php
index fc0384c..483d96c 100644
--- a/tests/Unit/Helpers/MoneyFormatTest.php
+++ b/tests/Unit/Helpers/MoneyFormatTest.php
@@ -17,9 +17,9 @@ class MoneyFormatTest extends TestCase
/** @test */
public function format_money_returns_string_with_default_money_sign()
{
- $this->assertEquals('Rp. 1.000', formatRp(1000));
- $this->assertEquals('Rp. 0', formatRp(0));
- $this->assertEquals('- Rp. 1.000', formatRp(-1000));
+ $this->assertEquals('Rp. 1.000', format_money(1000));
+ $this->assertEquals('Rp. 0', format_money(0));
+ $this->assertEquals('- Rp. 1.000', format_money(-1000));
}
/** @test */
@@ -30,8 +30,8 @@ class MoneyFormatTest extends TestCase
'value' => 'USD',
]);
- $this->assertEquals('USD 1.000', formatRp(1000));
- $this->assertEquals('USD 0', formatRp(0));
- $this->assertEquals('- USD 1.000', formatRp(-1000));
+ $this->assertEquals('USD 1.000', format_money(1000));
+ $this->assertEquals('USD 0', format_money(0));
+ $this->assertEquals('- USD 1.000', format_money(-1000));
}
}