Free Shipping, Business Levels correction, Products Buying, Fonts
This commit is contained in:
parent
7f6052acf5
commit
da10f19fcb
196 changed files with 9143 additions and 311 deletions
|
|
@ -7,8 +7,6 @@ use Storage;
|
|||
use App\User;
|
||||
use App\Services\Credit;
|
||||
use App\Models\UserCredit;
|
||||
use App\Services\UserMarign;
|
||||
|
||||
use App\Services\MyPDFMerger;
|
||||
use App\Models\UserCreditItem;
|
||||
|
||||
|
|
@ -30,6 +28,9 @@ class CreditRepository extends BaseRepository {
|
|||
|
||||
$this->user_credit = new UserCredit();
|
||||
$user_credit_items = $this->makeUserCredit();
|
||||
if(!count($user_credit_items)){
|
||||
return false;
|
||||
}
|
||||
$data = [
|
||||
'user' => $this->model,
|
||||
'credit_date' => $credit_date,
|
||||
|
|
@ -45,17 +46,17 @@ class CreditRepository extends BaseRepository {
|
|||
Storage::disk('public')->makeDirectory($dir); //creates directory
|
||||
}
|
||||
$path = Storage::disk('public')->getAdapter()->getPathPrefix();
|
||||
|
||||
$filename = Credit::makeCreditFilename($credit_number);
|
||||
|
||||
$pdf->save($path.$dir.$filename);
|
||||
|
||||
|
||||
$pdfMerger = new MyPDFMerger();
|
||||
$pdfMerger->addPDF($path.$dir.$filename);
|
||||
$file = $pdfMerger->myMerge('string', $filename, 'template_invoice_de');
|
||||
Storage::disk('public')->put($dir.$filename, $file);
|
||||
|
||||
|
||||
|
||||
$this->user_credit->user_id = $this->model->id;
|
||||
$this->user_credit->year = \Carbon::parse($credit_date)->format('Y');
|
||||
$this->user_credit->month = \Carbon::parse($credit_date)->format('n');
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ class ProductRepository extends BaseRepository {
|
|||
$data['active'] = isset($data['active']) ? 1 : 0;
|
||||
$data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0;
|
||||
$data['no_commission'] = isset($data['no_commission']) ? 1 : 0;
|
||||
$data['no_free_shipping'] = isset($data['no_free_shipping']) ? 1 : 0;
|
||||
$data['buying_restriction'] = isset($data['buying_restriction']) ? 1 : 0;
|
||||
$data['show_on'] = isset($data['show_on']) ? $data['show_on'] : null;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue