1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Working on products

This commit is contained in:
Hillel Coren 2014-04-24 01:04:21 +03:00
parent 2c4d635432
commit 0922b97567
9 changed files with 89 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class ProductController extends \BaseController {
return Datatable::query($query)
->addColumn('product_key', function($model) { return link_to('products/' . $model->public_id . '/edit', $model->product_key); })
->addColumn('notes', function($model) { return $model->notes; })
->addColumn('notes', function($model) { return nl2br(Str::limit($model->notes, 100)); })
->addColumn('cost', function($model) { return Utils::formatMoney($model->cost); })
->addColumn('dropdown', function($model)
{

View File

@ -319,4 +319,18 @@ return array(
'edit' => 'Edit',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
);

View File

@ -326,6 +326,7 @@ return array(
'set_name' => 'Set your company name',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',

View File

@ -317,5 +317,19 @@ return array(
'field_value' => 'Field Value',
'edit' => 'Edit',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
);

View File

@ -318,5 +318,19 @@ return array(
'field_value' => 'Field Value',
'edit' => 'Edit',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
);

View File

@ -319,4 +319,18 @@ return array(
'edit' => 'Edit',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
);

View File

@ -319,5 +319,19 @@ return array(
'edit' => 'Edit',
'view_invoice' => 'View invoice',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
);

View File

@ -308,5 +308,19 @@ return array(
'view_invoice' => 'View invoice',
'view_as_recipient' => 'View as recipient',
// product management
'product' => 'Product',
'products' => 'Products',
'fill_products' => 'Auto-fill products',
'fill_products_help' => 'Selecting a product will automatically <b>set the description and cost</b>',
'update_products' => 'Auto-update products',
'update_products_help' => 'Updating an invoice will automatically <b>update the products</b>',
'create_product' => 'Create Product',
'edit_product' => 'Edit Product',
'archive_product' => 'Archive Product',
'updated_product' => 'Successfully updated product',
'created_product' => 'Successfully created product',
'archived_product' => 'Successfully archived product',
);

View File

@ -25,7 +25,9 @@
trans('texts.action'))
->setUrl(url('api/products/'))
->setOptions('sPaginationType', 'bootstrap')
->setOptions('bFilter', false)
->setOptions('bFilter', false)
->setOptions('bAutoWidth', false)
->setOptions('aoColumns', [[ "sWidth"=> "20%" ], [ "sWidth"=> "45%" ], ["sWidth"=> "20%"], ["sWidth"=> "15%" ]])
->render('datatable') }}
<script>