mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Add debug logging
This commit is contained in:
parent
dba86306a5
commit
71e8b733ea
@ -25,6 +25,13 @@ class AccountGateway extends EntityModel
|
||||
*/
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'config'
|
||||
];
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -374,6 +374,13 @@ class InvoiceRepository extends BaseRepository
|
||||
$account = $invoice ? $invoice->account : \Auth::user()->account;
|
||||
$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';
|
||||
|
||||
if ($invoice) {
|
||||
|
Loading…
Reference in New Issue
Block a user