소스 검색

Merge pull request #341 from 1day2die/payment_methode_on_invoice

Add payment methode to invoice
Dennis 3 년 전
부모
커밋
a571b5a59d

+ 8 - 1
app/Http/Controllers/Admin/PaymentController.php

@@ -521,6 +521,12 @@ class PaymentController extends Controller
             ->title($creditProduct->description)
             ->pricePerUnit($creditProduct->price);
 
+        $notes = [
+            __("Payment method") .": ". $payment->payment_method,
+        ];
+        $notes = implode("<br>", $notes);
+
+
         $invoice = Invoice::make()
             ->template('controlpanel')
             ->name(__("Invoice"))
@@ -534,7 +540,8 @@ class PaymentController extends Controller
             ->series(now()->format('mY'))
             ->delimiter("-")
             ->sequence($newInvoiceID)
-            ->serialNumberFormat($InvoiceSettings->invoice_prefix . '{DELIMITER}{SERIES}{SEQUENCE}');
+            ->serialNumberFormat($InvoiceSettings->invoice_prefix . '{DELIMITER}{SERIES}{SEQUENCE}')
+            ->notes($notes);
 
         if (file_exists($logoPath)) {
             $invoice->logo($logoPath);

+ 1 - 0
resources/lang/de.json

@@ -226,6 +226,7 @@
     "Subtotal": "Zwischensumme",
     "Submit Payment": "Zahlung bestätigen",
     "Payment Methods": "Zahlungsmethoden",
+    "Payment method": "Zahlungsmethode",
     "By purchasing this product you agree and accept our terms of service": "Mit dem kauf akzeptierst du unsere TOS",
     "There are no store products!": "Es gibt keine Produkte",
     "The store is not correctly configured!": "Der Laden wurde nicht richtig konfiguriert",

+ 1 - 0
resources/lang/en.json

@@ -256,6 +256,7 @@
     "Subtotal": "Subtotal",
     "Submit Payment": "Submit Payment",
     "Payment Methods": "Payment Methods",
+    "Payment method": "Payment method",
     "By purchasing this product you agree and accept our terms of service": "By purchasing this product you agree and accept our terms of service",
     "There are no store products!": "There are no store products!",
     "The store is not correctly configured!": "The store is not correctly configured!",

+ 1 - 1
resources/views/vendor/invoices/templates/controlpanel.blade.php

@@ -364,7 +364,7 @@
 
         @if($invoice->notes)
             <p>
-                {{ trans('Notes') }}: {!! $invoice->notes !!}
+                {{ trans('Notes') }}:<br/> {!! $invoice->notes !!}
             </p>
         @endif