mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Stubs for purchase orderS
This commit is contained in:
parent
f9685035cd
commit
feacf65160
@ -136,6 +136,13 @@ class CompanySettings extends BaseSettings
|
||||
public $invoice_design_id = 'Wpmbk5ezJn'; //@implemented
|
||||
public $quote_design_id = 'Wpmbk5ezJn'; //@implemented
|
||||
public $credit_design_id = 'Wpmbk5ezJn'; //@implemented
|
||||
|
||||
public $purchase_order_design_id = 'Wpmbk5ezJn';
|
||||
public $purchase_order_footer = ''; //@implemented
|
||||
public $purchase_order_terms = ''; //@implemented
|
||||
public $purchase_order_public_notes = ''; //@implemented
|
||||
public $require_purchase_order_signature = false; //@TODO ben to confirm
|
||||
|
||||
public $invoice_footer = ''; //@implemented
|
||||
public $credit_footer = ''; //@implemented
|
||||
public $credit_terms = ''; //@implemented
|
||||
@ -280,6 +287,11 @@ class CompanySettings extends BaseSettings
|
||||
public $auto_archive_invoice_cancelled = false;
|
||||
|
||||
public static $casts = [
|
||||
'require_purchase_order_signature' => 'bool',
|
||||
'purchase_order_public_notes' => 'string',
|
||||
'purchase_order_terms' => 'string',
|
||||
'purchase_order_design_id' => 'string',
|
||||
'purchase_order_footer' => 'string',
|
||||
'purchase_order_number_pattern' => 'string',
|
||||
'purchase_order_number_counter' => 'int',
|
||||
'page_numbering_alignment' => 'string',
|
||||
|
@ -709,7 +709,6 @@ class InvoiceController extends BaseController
|
||||
echo Storage::get($file);
|
||||
}, basename($file), ['Content-Type' => 'application/pdf']);
|
||||
|
||||
|
||||
break;
|
||||
case 'restore':
|
||||
$this->invoice_repo->restore($invoice);
|
||||
|
@ -44,6 +44,21 @@ class CreatePurchaseOrderInvitationsTable extends Migration
|
||||
$table->unsignedInteger('client_id')->nullable()->change();
|
||||
});
|
||||
|
||||
|
||||
Company::cursor()->each(function ($company){
|
||||
|
||||
$settings = $company->settings;
|
||||
|
||||
$settings->purchase_order_design_id = 'Wpmbk5ezJn';
|
||||
$settings->purchase_order_footer = ''; //@implemented
|
||||
$settings->purchase_order_terms = ''; //@implemented
|
||||
$settings->purchase_order_public_notes = ''; //@implemented
|
||||
$settings->purchase_order_number_pattern = ''; //@implemented
|
||||
$settings->purchase_order_number_counter = 1; //@implemented
|
||||
|
||||
$company->settings = $settings;
|
||||
$company->save();
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,6 +68,5 @@ class CreatePurchaseOrderInvitationsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('purchase_order_invitations');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user