mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Add debug logging
This commit is contained in:
parent
99347c853a
commit
acb3d0718b
@ -23,6 +23,13 @@ class AccountGateway extends EntityModel
|
|||||||
*/
|
*/
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'config'
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -374,6 +374,13 @@ class InvoiceRepository extends BaseRepository
|
|||||||
$account = $invoice ? $invoice->account : \Auth::user()->account;
|
$account = $invoice ? $invoice->account : \Auth::user()->account;
|
||||||
$publicId = isset($data['public_id']) ? $data['public_id'] : false;
|
$publicId = isset($data['public_id']) ? $data['public_id'] : false;
|
||||||
|
|
||||||
|
if (Utils::isNinjaProd() && ! Utils::isReseller()) {
|
||||||
|
$copy = json_decode( json_encode($data), true);
|
||||||
|
$copy['data'] = false;
|
||||||
|
$logMessage = date('r') . ' account_id: ' . $account->id . ' ' . json_encode($copy);
|
||||||
|
@file_put_contents(storage_path('logs/invoice-repo.log'), $logMessage, FILE_APPEND);
|
||||||
|
}
|
||||||
|
|
||||||
$isNew = ! $publicId || $publicId == '-1';
|
$isNew = ! $publicId || $publicId == '-1';
|
||||||
|
|
||||||
if ($invoice) {
|
if ($invoice) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user