mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 09:14: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 Barryvdh\DomPDF\Facade\Pdf;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class ExpensesReportController extends Controller
|
||||
@@ -19,7 +20,7 @@ class ExpensesReportController extends Controller
|
||||
* Handle the incoming request.
|
||||
*
|
||||
* @param string $hash
|
||||
* @return JsonResponse
|
||||
* @return View|Response
|
||||
*/
|
||||
public function __invoke(Request $request, $hash)
|
||||
{
|
||||
|
||||
@@ -652,6 +652,7 @@
|
||||
"currency": "Currency",
|
||||
"contact": "Contact",
|
||||
"category": "Category",
|
||||
"uncategorized": "Uncategorized",
|
||||
"from_date": "From Date",
|
||||
"to_date": "To Date",
|
||||
"expense_date": "Date",
|
||||
@@ -1649,6 +1650,7 @@
|
||||
"pdf_total_tax_label": "TOTAL TAX",
|
||||
"pdf_tax_types_label": "Tax Types",
|
||||
"pdf_expenses_label": "Expenses",
|
||||
"pdf_expense_group_total_label": "Group total:",
|
||||
"pdf_bill_to": "Bill to,",
|
||||
"pdf_ship_to": "Ship to,",
|
||||
"pdf_received_from": "Received from:",
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
</table>
|
||||
<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>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user