mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Stubs for tax migrations
This commit is contained in:
parent
b3060ce0e0
commit
1bc53383be
@ -105,6 +105,12 @@ class Product extends BaseModel
|
||||
use SoftDeletes;
|
||||
use Filterable;
|
||||
|
||||
public const PRODUCT_TAX_EXEMPT = 0;
|
||||
public const PRODUCT_TYPE_PHYSICAL = 1;
|
||||
public const PRODUCT_TYPE_SERVICE = 2;
|
||||
public const PRODUCT_TYPE_DIGITAL = 3;
|
||||
public const PRODUCT_TYPE_FREIGHT = 4;
|
||||
|
||||
protected $fillable = [
|
||||
'custom_value1',
|
||||
'custom_value2',
|
||||
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('invoices', function (Blueprint $table) {
|
||||
$table->mediumText('tax_data')->nullable(); //json object
|
||||
});
|
||||
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->boolean('calculate_taxes')->default(false); //setting to turn on/off tax calculations
|
||||
$table->boolean('tax_all_products')->default(false); //globally tax all products if none defined
|
||||
});
|
||||
|
||||
Schema::table('products', function (Blueprint $table){
|
||||
$table->unsignedInteger('tax_id')->nullable(); // the product tax constant
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@ -5027,6 +5027,11 @@ $LANG = array(
|
||||
'notification_payment_emailed' => 'Payment :payment was emailed to :client',
|
||||
'notification_payment_emailed_subject' => 'Payment :payment was emailed',
|
||||
'record_not_found' => 'Record not found',
|
||||
'product_tax_exempt' => 'Product Tax Exempt',
|
||||
'product_type_physical' => 'Physical Goods',
|
||||
'product_type_digital' => 'Digital Goods',
|
||||
'product_type_service' => 'Services',
|
||||
'product_type_freight' => 'Shipping',
|
||||
);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user