diff --git a/app/Console/Commands/HostedMigrations.php b/app/Console/Commands/HostedMigrations.php index a672a9e1ed68..27d6fcd91edb 100644 --- a/app/Console/Commands/HostedMigrations.php +++ b/app/Console/Commands/HostedMigrations.php @@ -85,8 +85,6 @@ class HostedMigrations extends Command } $path = public_path('storage/migrations/import'); - - nlog(public_path('storage/migrations/import')); $directory = new DirectoryIterator($path); diff --git a/app/Console/Commands/ImportMigrations.php b/app/Console/Commands/ImportMigrations.php index c09058cda827..f80e21e6e7f7 100644 --- a/app/Console/Commands/ImportMigrations.php +++ b/app/Console/Commands/ImportMigrations.php @@ -79,8 +79,6 @@ class ImportMigrations extends Command $this->buildCache(); $path = $this->option('path') ?? public_path('storage/migrations/import'); - - nlog(public_path('storage/migrations/import')); $directory = new DirectoryIterator($path); diff --git a/app/DataMapper/BaseSettings.php b/app/DataMapper/BaseSettings.php index b35e31ccc17a..3e0bb50124dd 100644 --- a/app/DataMapper/BaseSettings.php +++ b/app/DataMapper/BaseSettings.php @@ -46,7 +46,6 @@ class BaseSettings return is_null($value) ? '' : (string) $value; case 'bool': case 'boolean': - nlog($value); return boolval($value); case 'object': return json_decode($value); diff --git a/app/Helpers/Invoice/ProRata.php b/app/Helpers/Invoice/ProRata.php index e3291b25c218..c768af3009d5 100644 --- a/app/Helpers/Invoice/ProRata.php +++ b/app/Helpers/Invoice/ProRata.php @@ -54,10 +54,7 @@ class ProRata { $days = $from_date->copy()->diffInDays($to_date); $days_in_frequency = $this->getDaysInFrequency($frequency); -nlog($from_date->format('Y-m-d')); -nlog($days); -nlog($days_in_frequency); -nlog($amount); + return round( (($days/$days_in_frequency) * $amount),2); } diff --git a/app/Http/ValidationRules/PaymentAmountsBalanceRule.php b/app/Http/ValidationRules/PaymentAmountsBalanceRule.php index e192edfbdf27..ba0c2117a7cd 100644 --- a/app/Http/ValidationRules/PaymentAmountsBalanceRule.php +++ b/app/Http/ValidationRules/PaymentAmountsBalanceRule.php @@ -75,12 +75,6 @@ class PaymentAmountsBalanceRule implements Rule return true; } - // nlog(request()->input('invoices')); - // nlog($payment_amounts); - // nlog($invoice_amounts); - // nlog(request()->all()); - nlog($payment_amounts ." >= " . $invoice_amounts); - return round($payment_amounts,2) >= round($invoice_amounts,2); } diff --git a/app/Import/Transformer/BaseTransformer.php b/app/Import/Transformer/BaseTransformer.php index 2762ce893878..fc4840fb0f35 100644 --- a/app/Import/Transformer/BaseTransformer.php +++ b/app/Import/Transformer/BaseTransformer.php @@ -74,7 +74,6 @@ class BaseTransformer ->where('id_number', $client_name); if ($client_id_search->count() >= 1) { - // nlog("found via id number => {$client_id_search->first()->id}"); return $client_id_search->first()->id; } @@ -83,7 +82,6 @@ class BaseTransformer ->where('name', $client_name); if ($client_name_search->count() >= 1) { - // nlog("found via name {$client_name_search->first()->id}"); return $client_name_search->first()->id; } } @@ -94,13 +92,10 @@ class BaseTransformer )->where('email', $client_email); if ($contacts->count() >= 1) { - // nlog("found via contact {$contacts->first()->client_id}"); return $contacts->first()->client_id; } } - // nlog("did not find client"); - return null; } diff --git a/app/Import/Transformers/BaseTransformer.php b/app/Import/Transformers/BaseTransformer.php index 97c21a2614bb..cf0b2199270a 100644 --- a/app/Import/Transformers/BaseTransformer.php +++ b/app/Import/Transformers/BaseTransformer.php @@ -66,14 +66,12 @@ class BaseTransformer if ( $client_id_search->count() >= 1 ) { return $client_id_search->first()->id; - nlog("found via id number"); } $client_name_search = $clients->where( 'name', $client_name ); if ( $client_name_search->count() >= 1 ) { return $client_name_search->first()->id; - nlog("found via name"); } if ( ! empty( $client_email ) ) { @@ -82,10 +80,8 @@ class BaseTransformer if ( $contacts->count() >= 1 ) { return $contacts->first()->client_id; - nlog("found via contact"); } } - // nlog("did not find client"); return null; } diff --git a/app/Jobs/Company/CompanyImport.php b/app/Jobs/Company/CompanyImport.php index 5041107ecc28..ae006fb828f1 100644 --- a/app/Jobs/Company/CompanyImport.php +++ b/app/Jobs/Company/CompanyImport.php @@ -483,8 +483,6 @@ class CompanyImport implements ShouldQueue $tmp_company->db = config('database.default'); $tmp_company->account_id = $this->account->id; -nlog($tmp_company); - if(Ninja::isHosted()) $tmp_company->subdomain = MultiDB::randomSubdomainGenerator(); else diff --git a/app/PaymentDrivers/Eway/CreditCard.php b/app/PaymentDrivers/Eway/CreditCard.php index bf7aab9657c6..98982d534661 100644 --- a/app/PaymentDrivers/Eway/CreditCard.php +++ b/app/PaymentDrivers/Eway/CreditCard.php @@ -255,9 +255,6 @@ class CreditCard $response = $this->eway_driver->init()->eway->createTransaction(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction); - nlog('eway'); - nlog($response); - $response_status = ErrorCode::getStatus($response->ResponseMessage); if(!$response_status['success']){ diff --git a/app/PaymentDrivers/PayFastPaymentDriver.php b/app/PaymentDrivers/PayFastPaymentDriver.php index 333ecb7ea465..74d3883e9de9 100644 --- a/app/PaymentDrivers/PayFastPaymentDriver.php +++ b/app/PaymentDrivers/PayFastPaymentDriver.php @@ -151,8 +151,6 @@ class PayFastPaymentDriver extends BaseDriver if($this->company_gateway->getConfigField('passphrase')) $fields['passphrase'] = $this->company_gateway->getConfigField('passphrase'); - nlog(http_build_query($fields)); - return md5(http_build_query($fields)); } diff --git a/app/Services/Invoice/HandleRestore.php b/app/Services/Invoice/HandleRestore.php index 5b10db4fc352..8bc082d59025 100644 --- a/app/Services/Invoice/HandleRestore.php +++ b/app/Services/Invoice/HandleRestore.php @@ -41,70 +41,15 @@ class HandleRestore extends AbstractService foreach ($this->invoice->payments as $payment) { //restore the payment record - // $payment->restore(); $this->invoice->restore(); -// //determine the paymentable amount before paymentable restoration -// $pre_restore_amount = $payment->paymentables() -// ->where('paymentable_type', '=', 'invoices') -// ->sum(\DB::raw('amount')); - -// nlog("first pre restore amount = {$pre_restore_amount}"); - -// $pre_restore_amount -= $payment->paymentables() -// ->where('paymentable_type', '=', 'invoices') -// ->sum(\DB::raw('refunded')); - -// nlog("second pre restore amount = {$pre_restore_amount}"); - - - //restore the paymentables - // $payment->paymentables() - // ->where('paymentable_type', '=', 'invoices') - // ->where('paymentable_id', $this->invoice->id) - // ->restore(); - - //determine the post restore paymentable amount (we need to increment the payment amount by the difference between pre and post) -// $payment_amount = $payment->paymentables() -// ->where('paymentable_type', '=', 'invoices') -// ->sum(\DB::raw('amount')); - -// nlog("first payment_amount = {$payment_amount}"); - -// $payment_amount -= $payment->paymentables() -// ->where('paymentable_type', '=', 'invoices') -// ->sum(\DB::raw('refunded')); - -// nlog("second payment_amount = {$payment_amount}"); - -// nlog($payment->amount . " == " . $payment_amount); - - // if ($payment->amount == $payment_amount) { - // $payment->is_deleted = false; - // $payment->save(); - - // $this->payment_total += $payment_amount; - // } else { - // $payment->is_deleted = false; - // $payment->amount += ($payment_amount - $pre_restore_amount); - // $payment->applied += ($payment_amount - $pre_restore_amount); - // $payment->save(); - - // $this->payment_total += ($payment_amount - $pre_restore_amount); - // } } //adjust ledger balance $this->invoice->ledger()->updateInvoiceBalance($this->invoice->balance, "Restored invoice {$this->invoice->number}")->save(); - //adjust paid to dates - // $this->invoice->client->service()->updatePaidToDate($this->payment_total)->save(); - $this->invoice->client->service()->updateBalance($this->invoice->balance)->save(); - // you only need to touch the ledger ONCE per transaction. - // $this->invoice->ledger()->updatePaymentBalance($this->payment_total*-1, "Restored payment for invoice {$this->invoice->number}")->save(); - $this->windBackInvoiceNumber(); $this->invoice->is_deleted = false;