mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Fixes for updating products
This commit is contained in:
parent
14c41634e2
commit
1b3a9e6398
@ -136,7 +136,7 @@ class CompanySettings extends BaseSettings
|
|||||||
public $tax_name3 = ''; //@TODO where do we use this?
|
public $tax_name3 = ''; //@TODO where do we use this?
|
||||||
public $tax_rate3 = 0; //@TODO where do we use this?
|
public $tax_rate3 = 0; //@TODO where do we use this?
|
||||||
public $payment_type_id = '0'; //@TODO where do we use this?
|
public $payment_type_id = '0'; //@TODO where do we use this?
|
||||||
public $invoice_fields = ''; //@TODO is this redundant, we store this in the custom_fields on the company?
|
// public $invoice_fields = ''; //@TODO is this redundant, we store this in the custom_fields on the company?
|
||||||
|
|
||||||
public $show_accept_invoice_terms = false; //@TODO ben to confirm
|
public $show_accept_invoice_terms = false; //@TODO ben to confirm
|
||||||
public $show_accept_quote_terms = false; //@TODO ben to confirm
|
public $show_accept_quote_terms = false; //@TODO ben to confirm
|
||||||
@ -392,7 +392,7 @@ class CompanySettings extends BaseSettings
|
|||||||
'invoice_number_pattern' => 'string',
|
'invoice_number_pattern' => 'string',
|
||||||
'invoice_number_counter' => 'integer',
|
'invoice_number_counter' => 'integer',
|
||||||
'invoice_design_id' => 'string',
|
'invoice_design_id' => 'string',
|
||||||
'invoice_fields' => 'string',
|
// 'invoice_fields' => 'string',
|
||||||
'invoice_taxes' => 'int',
|
'invoice_taxes' => 'int',
|
||||||
//'enabled_item_tax_rates' => 'int',
|
//'enabled_item_tax_rates' => 'int',
|
||||||
'invoice_footer' => 'string',
|
'invoice_footer' => 'string',
|
||||||
|
@ -78,7 +78,6 @@
|
|||||||
* @OA\Property(property="tax_name3", type="string", example="GST", description="The tax name"),
|
* @OA\Property(property="tax_name3", type="string", example="GST", description="The tax name"),
|
||||||
* @OA\Property(property="payment_type_id", type="string", example="1", description="The default payment type id"),
|
* @OA\Property(property="payment_type_id", type="string", example="1", description="The default payment type id"),
|
||||||
* @OA\Property(property="custom_fields", type="string", example="{}", description="JSON string of custom fields"),
|
* @OA\Property(property="custom_fields", type="string", example="{}", description="JSON string of custom fields"),
|
||||||
* @OA\Property(property="invoice_fields", type="string", example="{}", description="JSON string of invoice fields"),
|
|
||||||
* @OA\Property(property="email_footer", type="string", example="A default email footer", description="The default email footer"),
|
* @OA\Property(property="email_footer", type="string", example="A default email footer", description="The default email footer"),
|
||||||
* @OA\Property(property="email_sending_method", type="string", example="default", description="The email driver to use to send email, options include default, gmail"),
|
* @OA\Property(property="email_sending_method", type="string", example="default", description="The email driver to use to send email, options include default, gmail"),
|
||||||
* @OA\Property(property="gmail_sending_user_id", type="string", example="F76sd34D", description="The hashed_id of the user account to send email from"),
|
* @OA\Property(property="gmail_sending_user_id", type="string", example="F76sd34D", description="The hashed_id of the user account to send email from"),
|
||||||
|
@ -406,7 +406,7 @@ class ProductController extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function destroy(DestroyProductRequest $request, Product $product)
|
public function destroy(DestroyProductRequest $request, Product $product)
|
||||||
{
|
{
|
||||||
$product->delete();
|
$product = $this->product_repo->delete($product);
|
||||||
|
|
||||||
return $this->itemResponse($product);
|
return $this->itemResponse($product);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,6 @@ class RecurringInvoice extends BaseModel
|
|||||||
'due_date',
|
'due_date',
|
||||||
'due_date_days',
|
'due_date_days',
|
||||||
'line_items',
|
'line_items',
|
||||||
'settings',
|
|
||||||
'footer',
|
'footer',
|
||||||
'public_notes',
|
'public_notes',
|
||||||
'private_notes',
|
'private_notes',
|
||||||
|
@ -292,7 +292,7 @@ class BaseRepository
|
|||||||
$model = $model->service()->applyNumber()->save();
|
$model = $model->service()->applyNumber()->save();
|
||||||
|
|
||||||
/* Update product details if necessary */
|
/* Update product details if necessary */
|
||||||
if ($model->company->update_products !== false)
|
if ($model->company->update_products)
|
||||||
UpdateOrCreateProduct::dispatch($model->line_items, $model, $model->company);
|
UpdateOrCreateProduct::dispatch($model->line_items, $model, $model->company);
|
||||||
|
|
||||||
/* Perform model specific tasks */
|
/* Perform model specific tasks */
|
||||||
|
Loading…
Reference in New Issue
Block a user