Can someone explain to me what role these two sections have over the products?
1 - Product units: This is within the products menu.
2 - Add item: Appears when you create a quote or invoice, below each line.
Thank you.
Can someone explain to me what role these two sections have over the products?
1 - Product units: This is within the products menu.
2 - Add item: Appears when you create a quote or invoice, below each line.
Thank you.
Items are just blank lines in an invoice. You can fill it with details that are not available as a product. For example one-time items or additional descriptions. You can use them but you donât have to if you only sell pre-defined products.
Product units are the units displayed besides the amount and identify what the product amount is.
Examples: units, kg, 10-Pack, hours, GB,âŠ
This makes sense if you sell special products like 10GB of storage on a server or 500kg of metal. In both cases it makes more sense to use âGBâ or âkgâ as a unit instead of just saying â500unitsâ.
Understood, thanks for the explanation. But when I give âAdd articleâ, within the budget or invoice, nothing happens, nothing comes out. I see that it makes an ajax call, but it does not return anything.
Could you enable the debug mode and post the response of the ajax call please?
INFO - 2018-04-11 07:16:39 --> Config Class Initialized
INFO - 2018-04-11 07:16:39 --> Hooks Class Initialized
DEBUG - 2018-04-11 07:16:39 --> UTF-8 Support Enabled
INFO - 2018-04-11 07:16:39 --> Utf8 Class Initialized
INFO - 2018-04-11 07:16:39 --> URI Class Initialized
INFO - 2018-04-11 07:16:39 --> Router Class Initialized
INFO - 2018-04-11 07:16:39 --> Output Class Initialized
INFO - 2018-04-11 07:16:39 --> Security Class Initialized
DEBUG - 2018-04-11 07:16:39 --> Global POST, GET and COOKIE data sanitized
INFO - 2018-04-11 07:16:39 --> CSRF cookie sent
INFO - 2018-04-11 07:16:39 --> Input Class Initialized
INFO - 2018-04-11 07:16:39 --> Language Class Initialized
INFO - 2018-04-11 07:16:39 --> Language Class Initialized
INFO - 2018-04-11 07:16:39 --> Config Class Initialized
INFO - 2018-04-11 07:16:39 --> Loader Class Initialized
INFO - 2018-04-11 07:16:39 --> Controller Class Initialized
INFO - 2018-04-11 07:16:39 --> Helper loaded: settings_helper
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\modules/settings/models/Mdl_settings.php
DEBUG - 2018-04-11 07:16:39 --> Ajax MX_Controller Initialized
DEBUG - 2018-04-11 07:16:39 --> Config file loaded: C:\wamp64\www\InvoicePlane\application\config/invoice_plane.php
INFO - 2018-04-11 07:16:39 --> Session: Class initialized using âfilesâ driver.
INFO - 2018-04-11 07:16:39 --> Helper loaded: redirect_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: url_helper
DEBUG - 2018-04-11 07:16:39 --> Encryption: Auto-configured driver âopensslâ.
INFO - 2018-04-11 07:16:39 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2018-04-11 07:16:39 --> Encryption Class Initialized
INFO - 2018-04-11 07:16:39 --> Helper loaded: form_helper
INFO - 2018-04-11 07:16:39 --> Form Validation Class Initialized
INFO - 2018-04-11 07:16:39 --> Database Driver Class Initialized
INFO - 2018-04-11 07:16:39 --> Helper loaded: trans_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: number_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: pager_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: invoice_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: date_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: echo_helper
INFO - 2018-04-11 07:16:39 --> Helper loaded: client_helper
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\modules/settings/models/Mdl_versions.php
INFO - 2018-04-11 07:16:39 --> Language file loaded: language/Spanish/ip_lang.php
INFO - 2018-04-11 07:16:39 --> Language file loaded: language/Spanish/form_validation_lang.php
INFO - 2018-04-11 07:16:39 --> Language file loaded: language/Spanish/custom_lang.php
INFO - 2018-04-11 07:16:39 --> Language file loaded: language/Spanish/gateway_lang.php
INFO - 2018-04-11 07:16:39 --> Helper loaded: language_helper
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\controllers/âŠ/modules/layout/controllers/Layout.php
DEBUG - 2018-04-11 07:16:39 --> Layout MX_Controller Initialized
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\modules/products/models/Mdl_products.php
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\modules/families/models/Mdl_families.php
ERROR - 2018-04-11 07:16:39 --> Severity: Notice --> Undefined variable: default_item_tax_rate C:\wamp64\www\InvoicePlane\application\modules\products\views\modal_product_lookups.php 24
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\modules/products/views/partial_product_table_modal.php
DEBUG - 2018-04-11 07:16:39 --> File loaded: C:\wamp64\www\InvoicePlane\application\modules/products/views/modal_product_lookups.php
INFO - 2018-04-11 07:16:39 --> Final output sent to browser
DEBUG - 2018-04-11 07:16:39 --> Total execution time: 0.3240
<div class="form-inline">
<div class="form-group filter-form">
<select name="filter_family" id="filter_family" class="form-control simple-select">
<option value="">Cualquier familia</option>
</select>
</div>
<div class="form-group">
<input type="text" class="form-control" name="filter_product" id="filter_product"
placeholder="Nombre del producto"
value="">
</div>
<button type="button" id="filter-button"
class="btn btn-default">Buscar producto</button>
<button type="button" id="product-reset-button" class="btn btn-default">
Resetear </button>
</div>
<br/>
<div id="product-lookup-table">
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tr>
<th> </th>
<th>Referencia</th>
<th>Nombre de Familia</th>
<th>Nombre del producto</th>
<th>DescripciĂłn del producto</th>
<th class="text-right">Precio</th>
</tr>
<tr class="product">
<td class="text-left">
<input type="checkbox" name="product_ids[]"
value="1">
</td>
<td nowrap class="text-left">
<b>451485</b>
</td>
<td>
<b></b>
</td>
<td>
<b>pruebas</b>
</td>
<td>
descipecion de pruebasd asd df sdf dn dkjng dfg </td>
<td class="text-right">
50,00⏠</td>
</tr>
<tr class="product">
<td class="text-left">
<input type="checkbox" name="product_ids[]"
value="2">
</td>
<td nowrap class="text-left">
<b></b>
</td>
<td>
<b></b>
</td>
<td>
<b>pruebas2</b>
</td>
<td>
</td>
<td class="text-right">
15,00⏠</td>
</tr>
</table>
</div>
<div class="modal-footer">
<div class="btn-group">
<button class="select-items-confirm btn btn-success" type="button">
<i class="fa fa-check"></i>
Enviar </button>
<button class="btn btn-danger" type="button" data-dismiss="modal">
<i class="fa fa-times"></i>
Cancelar </button>
</div>
</div>
</form>
SOLUTION!
In the file: modules/products/Ajax.php
Add this variable on line 48:
âdefault_item_tax_rateâ => $ default_item_tax_rate
Being that way:
$data = array (
âproductsâ => $products,
âfamiliesâ => $families,
âfilter_productâ => $filter_product,
âfilter_familyâ => $filter_family,
âdefault_item_tax_rateâ => $default_item_tax_rate
);
Thanks for the hint!
Which version are you using currently?
The latest stable version 1.5.9
Youâre welcome, a pleasure to help. I hope to continue doing it more and better.
@daniel89fg
I double-checked this and the default_item_tax_rate variable is present since October last year and present in version 1.5.9: https://github.com/InvoicePlane/InvoicePlane/blob/1.5/application/modules/products/controllers/Ajax.php#L48