mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01: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'];
|
||||
|
||||
/**
|
||||
* @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