FahimAnzamDip / triangle-pos

Triangle POS is an open source Inventory Management with POS System. Developed with Laravel 10, Bootstrap 4 & Livewire 3. It's completely free to use.
625 stars 201 forks source link

bug #8

Closed shimulckbt closed 1 year ago

shimulckbt commented 2 years ago

pdf generator invalid in payment details, barcode pdf download does'nt work

FahimAnzamDip commented 2 years ago

Can you please write down the error message?

sarmadmahar commented 2 years ago

no error is showing but PDF error in popup Failed to load PDF document.

sarmadmahar commented 2 years ago

Simply replace this code inside of [ROOT_document]\triangle-pos-master\Modules\Sale\Routes\web.php

Route::get('/sales/pos/pdf/{id}', function ($id) {
        $sale = \Modules\Sale\Entities\Sale::findOrFail($id);
//        $pdf = \PDF::loadView('sale::print-pos', [
//            'sale' => $sale,
//        ])->setPaper('a7')
//            ->setOption('margin-top', 8)
//            ->setOption('margin-bottom', 8)
//            ->setOption('margin-left', 5)
//            ->setOption('margin-right', 5);
//
//        return $pdf->stream('sale-'. $sale->reference .'.pdf');
        $html=view('sale::print-pos',['sale'=>$sale]);
        $mpdf = new \Mpdf\Mpdf(['format' => [80, 150]]);
        $mpdf->WriteHTML($html);
        $mpdf->Output();
    })->name('sales.pos.pdf');
FahimAnzamDip commented 2 years ago

It's using Laravel Snappy for pdf. Not Mpdf. But yes you can use it.

shimulckbt commented 2 years ago

thank you!!

shimulckbt commented 2 years ago

have you used swiftmailer?

On Sat, Jan 1, 2022 at 12:15 AM Fahim Anzam Dip @.***> wrote:

It's using Laravel Snappy for pdf. Not Mpdf. But yes you can use it.

— Reply to this email directly, view it on GitHub https://github.com/FahimAnzamDip/triangle-pos/issues/8#issuecomment-1003430250, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDCJIYKMEL62CKVBQD4NUTUTXXK3ANCNFSM5I4N2KLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

sarmadmahar commented 2 years ago

Yes I used it

OBouysfi commented 2 years ago

Illuminate\Contracts\Container\BindingResolutionException

Target class [CommandMakeCommand] does not exist.

on composer install

FahimAnzamDip commented 1 year ago

PDF Generator in this project is Laravel Snappy.