Reformat with pint

This commit is contained in:
Darko Gjorgjijoski
2025-01-12 18:37:08 +01:00
parent 34b9f52af7
commit e9e52c60a7
32 changed files with 87 additions and 89 deletions

View File

@@ -227,7 +227,7 @@ class Estimate extends Model implements HasMedia
$estimate = self::create($data);
$estimate->unique_hash = Hashids::connection(Estimate::class)->encode($estimate->id);
$serial = (new SerialNumberFormatter())
$serial = (new SerialNumberFormatter)
->setModel($estimate)
->setCompany($estimate->company_id)
->setCustomer($estimate->customer_id)
@@ -262,7 +262,7 @@ class Estimate extends Model implements HasMedia
{
$data = $request->getEstimatePayload();
$serial = (new SerialNumberFormatter())
$serial = (new SerialNumberFormatter)
->setModel($this)
->setCompany($this->company_id)
->setCustomer($request->customer_id)

View File

@@ -323,7 +323,7 @@ class Invoice extends Model implements HasMedia
$invoice = Invoice::create($data);
$serial = (new SerialNumberFormatter())
$serial = (new SerialNumberFormatter)
->setModel($invoice)
->setCompany($invoice->company_id)
->setCustomer($invoice->customer_id)
@@ -364,7 +364,7 @@ class Invoice extends Model implements HasMedia
public function updateInvoice($request)
{
$serial = (new SerialNumberFormatter())
$serial = (new SerialNumberFormatter)
->setModel($this)
->setCompany($this->company_id)
->setCustomer($request->customer_id)

View File

@@ -163,7 +163,7 @@ class Payment extends Model implements HasMedia
$payment = Payment::create($data);
$payment->unique_hash = Hashids::connection(Payment::class)->encode($payment->id);
$serial = (new SerialNumberFormatter())
$serial = (new SerialNumberFormatter)
->setModel($payment)
->setCompany($payment->company_id)
->setCustomer($payment->customer_id)
@@ -215,7 +215,7 @@ class Payment extends Model implements HasMedia
$invoice->subtractInvoicePayment($request->amount);
}
$serial = (new SerialNumberFormatter())
$serial = (new SerialNumberFormatter)
->setModel($this)
->setCompany($this->company_id)
->setCustomer($request->customer_id)
@@ -452,8 +452,8 @@ class Payment extends Model implements HasMedia
{
$invoice = Invoice::find($transaction->invoice_id);
$serial = (new SerialNumberFormatter())
->setModel(new Payment())
$serial = (new SerialNumberFormatter)
->setModel(new Payment)
->setCompany($invoice->company_id)
->setCustomer($invoice->customer_id)
->setNextNumbers();

View File

@@ -307,9 +307,9 @@ class RecurringInvoice extends Model
public function createInvoice()
{
//get invoice_number
$serial = (new SerialNumberFormatter())
->setModel(new Invoice())
// get invoice_number
$serial = (new SerialNumberFormatter)
->setModel(new Invoice)
->setCompany($this->company_id)
->setCustomer($this->customer_id)
->setNextNumbers();
@@ -375,7 +375,7 @@ class RecurringInvoice extends Model
$invoice->addCustomFields($customField);
}
//send automatically
// send automatically
if ($this->send_automatically == true) {
$data = [
'body' => CompanySetting::getSetting('invoice_mail_body', $this->company_id),

View File

@@ -22,7 +22,7 @@ class Setting extends Model
return;
}
$set = new Setting();
$set = new Setting;
$set->option = $key;
$set->value = $setting;
$set->save();