1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Update CreateInvitations.php (#3331)

This commit is contained in:
michael-hampton 2020-02-15 11:51:29 +00:00 committed by GitHub
parent 53d72d47d4
commit bd8a6b462a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,12 +22,12 @@ class CreateInvitations
->whereQuoteId($quote->id)
->first();
if (!$invitation && $contact->send_quote) {
if (!$invitation && $contact->send_invoice) {
$ii = QuoteInvitationFactory::create($quote->company_id, $quote->user_id);
$ii->quote_id = $quote->id;
$ii->client_contact_id = $contact->id;
$ii->save();
} elseif ($invitation && !$contact->send_quote) {
} elseif ($invitation && !$contact->send_invoice) {
$invitation->delete();
}
});