LaravelDaily / laravel-invoices

Laravel package to generate PDF invoices from various customizable parameters
GNU General Public License v3.0
1.39k stars 303 forks source link

Wrong file sequence number? #105

Closed robertpotkowa closed 3 years ago

robertpotkowa commented 3 years ago

If i set the sequence, the filename is still everytime "invoice_AA_0001.pdf".

$customer = new Buyer([
            'name'          => 'John Doe',
            'custom_fields' => [
                'email' => 'test@example.com',
            ],
        ]);

    $item = (new InvoiceItem())->title('Service 1')->pricePerUnit(2);

    $invoice = Invoice::make()
        ->buyer($customer)
        ->sequence(2)
        ->addItem($item);

    dd($invoice);

LaravelDaily\Invoices\Invoice {#1530 ▼ +name: "Invoice" +seller: LaravelDaily\Invoices\Classes\Seller {#1756 ▶} +buyer: LaravelDaily\Invoices\Classes\Buyer {#1759 ▶} +items: Illuminate\Support\Collection {#1757 ▶} +template: "default" +filename: "invoice_AA_00001.pdf" +notes: null +logo: null +discount_percentage: null +total_discount: null +tax_rate: null +taxable_amount: null +shipping_amount: null +total_taxes: null +total_amount: null +hasItemUnits: null +hasItemDiscount: null +hasItemTax: null +table_columns: 4 +pdf: null +output: null

userDefinedData: null

+currency_code: "EUR" +currency_fraction: "ct." +currency_symbol: "€" +currency_decimals: 2 +currency_decimal_point: "," +currency_thousands_separator: "." +currency_format: "{VALUE} {SYMBOL}" +date: Carbon\Carbon @1631862755 {#1720 ▶} +date_format: "d.m.Y" +pay_until_days: 7 +disk: "invoices" +series: "AA" +sequence: "00002" +sequence_padding: 5 +delimiter: "-" +serial_number_format: "{SERIES}{DELIMITER}{SEQUENCE}" }

mc0de commented 3 years ago

@byronidev path will come out with new release of v2.1 later this day