mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-22 20:54:08 +00:00
fix: i18n for expense report PDF and correct report controller return types
Add expenses.uncategorized and pdf_expense_group_total_label; use the new key in the grouped expense template; document View|Response instead of JsonResponse. Made-with: Cursor
This commit is contained in:
@@ -9,8 +9,9 @@ use App\Models\Currency;
|
|||||||
use App\Models\Expense;
|
use App\Models\Expense;
|
||||||
use Barryvdh\DomPDF\Facade\Pdf;
|
use Barryvdh\DomPDF\Facade\Pdf;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
use Illuminate\Support\Facades\App;
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class ExpensesReportController extends Controller
|
class ExpensesReportController extends Controller
|
||||||
@@ -19,7 +20,7 @@ class ExpensesReportController extends Controller
|
|||||||
* Handle the incoming request.
|
* Handle the incoming request.
|
||||||
*
|
*
|
||||||
* @param string $hash
|
* @param string $hash
|
||||||
* @return JsonResponse
|
* @return View|Response
|
||||||
*/
|
*/
|
||||||
public function __invoke(Request $request, $hash)
|
public function __invoke(Request $request, $hash)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -652,6 +652,7 @@
|
|||||||
"currency": "Currency",
|
"currency": "Currency",
|
||||||
"contact": "Contact",
|
"contact": "Contact",
|
||||||
"category": "Category",
|
"category": "Category",
|
||||||
|
"uncategorized": "Uncategorized",
|
||||||
"from_date": "From Date",
|
"from_date": "From Date",
|
||||||
"to_date": "To Date",
|
"to_date": "To Date",
|
||||||
"expense_date": "Date",
|
"expense_date": "Date",
|
||||||
@@ -1649,6 +1650,7 @@
|
|||||||
"pdf_total_tax_label": "TOTAL TAX",
|
"pdf_total_tax_label": "TOTAL TAX",
|
||||||
"pdf_tax_types_label": "Tax Types",
|
"pdf_tax_types_label": "Tax Types",
|
||||||
"pdf_expenses_label": "Expenses",
|
"pdf_expenses_label": "Expenses",
|
||||||
|
"pdf_expense_group_total_label": "Group total:",
|
||||||
"pdf_bill_to": "Bill to,",
|
"pdf_bill_to": "Bill to,",
|
||||||
"pdf_ship_to": "Ship to,",
|
"pdf_ship_to": "Ship to,",
|
||||||
"pdf_received_from": "Received from:",
|
"pdf_received_from": "Received from:",
|
||||||
|
|||||||
@@ -253,7 +253,7 @@
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
<div class="item-table-group-total">
|
<div class="item-table-group-total">
|
||||||
<p>@lang('Group Total:') <span style="color: #5851D8;">{!! format_money_pdf($group['total'], $currency) !!}</span></p>
|
<p>@lang('pdf_expense_group_total_label') <span style="color: #5851D8;">{!! format_money_pdf($group['total'], $currency) !!}</span></p>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user