mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Add additional import props for vendors
This commit is contained in:
parent
9089d548b5
commit
da27d5bdb4
@ -63,14 +63,17 @@ class ProfitAndLossController extends BaseController
|
||||
*/
|
||||
public function __invoke(ProfitLossRequest $request)
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
if ($request->has('send_email') && $request->get('send_email')) {
|
||||
SendToAdmin::dispatch(auth()->user()->company(), $request->all(), ProfitLoss::class, $this->filename);
|
||||
SendToAdmin::dispatch($user->company(), $request->all(), ProfitLoss::class, $this->filename);
|
||||
|
||||
return response()->json(['message' => 'working...'], 200);
|
||||
}
|
||||
// expect a list of visible fields, or use the default
|
||||
|
||||
$pnl = new ProfitLoss(auth()->user()->company(), $request->all());
|
||||
$pnl = new ProfitLoss($user->company(), $request->all());
|
||||
$csv = $pnl->run();
|
||||
|
||||
$headers = [
|
||||
|
@ -33,14 +33,18 @@ class VendorMap
|
||||
14 => 'vendor.state',
|
||||
15 => 'vendor.postal_code',
|
||||
16 => 'vendor.country_id',
|
||||
17 => 'contact.first_name',
|
||||
18 => 'contact.last_name',
|
||||
19 => 'contact.email',
|
||||
20 => 'contact.phone',
|
||||
21 => 'contact.custom_value1',
|
||||
22 => 'contact.custom_value2',
|
||||
23 => 'contact.custom_value3',
|
||||
24 => 'contact.custom_value4',
|
||||
17 => 'vendor.custom_value1',
|
||||
18 => 'vendor.custom_value2',
|
||||
19 => 'vendor.custom_value3',
|
||||
20 => 'vendor.custom_value4',
|
||||
21 => 'contact.first_name',
|
||||
22 => 'contact.last_name',
|
||||
23 => 'contact.email',
|
||||
24 => 'contact.phone',
|
||||
25 => 'contact.custom_value1',
|
||||
26 => 'contact.custom_value2',
|
||||
27 => 'contact.custom_value3',
|
||||
28 => 'contact.custom_value4',
|
||||
|
||||
];
|
||||
}
|
||||
@ -65,14 +69,18 @@ class VendorMap
|
||||
14 => 'texts.state',
|
||||
15 => 'texts.postal_code',
|
||||
16 => 'texts.country',
|
||||
17 => 'texts.first_name',
|
||||
18 => 'texts.last_name',
|
||||
19 => 'texts.email',
|
||||
20 => 'texts.phone',
|
||||
21 => 'texts.custom_value',
|
||||
22 => 'texts.custom_value',
|
||||
23 => 'texts.custom_value',
|
||||
24 => 'texts.custom_value',
|
||||
17 => 'texts.custom_value',
|
||||
18 => 'texts.custom_value',
|
||||
19 => 'texts.custom_value',
|
||||
20 => 'texts.custom_value',
|
||||
21 => 'texts.first_name',
|
||||
22 => 'texts.last_name',
|
||||
23 => 'texts.email',
|
||||
24 => 'texts.phone',
|
||||
25 => 'texts.custom_value',
|
||||
26 => 'texts.custom_value',
|
||||
27 => 'texts.custom_value',
|
||||
28 => 'texts.custom_value',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class ProfitLoss
|
||||
if ($this->is_income_billed) { //get invoiced amounts
|
||||
$this->filterIncome();
|
||||
} else {
|
||||
//$this->filterPaymentIncome();
|
||||
|
||||
$this->filterInvoicePaymentIncome();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user