how can I add the name of the table in the pos restaurant receipt? - odoo-9

is there any possible way to add the name of the table that had the order in the printed bill of the restaurant module,and which file needs to be modified?I have already posted this question in details with all things that I have tried to add in some files but unfortunatly no one answered !!

for all people who have interest in this I figured out how to add that field so first I thought that only the pos restaurant module files that needs to be modified so I was wrong and it's what it was all about,so the main file that should be modified is the addons\point_of_sale\static\src\xml\pos.xml ,to specifiy it's the PosTicket template,so the modification showed up right away because after all that restaurant module depends on the main point of sale
I added my code just after the shop widget like :
Table: <t t-esc="widget.pos.table.name"/><br />
and name of the table was added in the printed ticket
hope this helps you

Add the following in pos ticket,
Table: <t t-esc="order.table['name']"/><br/>

Related

How to add another table column in searchable array in nova?

i am getting data from different different tables and i displayed all those in one section that section contains search button also, i want to add another resource field as a searchable item in nova ,i am trying to add based on the relation of the particular table but it's throwing an error undefined column, How to add please help..
public static $searchable=['id','name','account.type'];
Basically, the search by relationship is not possible through Nova.
A package well made for your needs is this one: LaravelNovaSearch
This package includes both relationship search but also has other useful features making the search much more comprehensive.
Another package, which I have not personally tested, but which seems to be useful for your needs: NovaSearchRelations
My advice is to use LaravelNovaSearch, more maintained and more complete.

Laravel: Pivot Table, ManytoMany

I have been stuck on this since May 2020. I don't know how to move forward with the project. Any link or guidance would be very much appreciated. I'm trying to create a very simple rental system.
I have a Customer table: id, Name, Barcode
Another one is Item table: id, Name, Barcode, OnLoan
I'm trying to create a Form where there is a search box for Customer and search box for the Items. When the customer barcode is found and item barcode is found, you can fill in the Date Loaned and Date Due and click submit.
In the Item table, the OnLoan needs to be set to 1.
How do we do this please? Any link or keywords to help me on my way would be really great.
I have been googling and found out about onetomany, manytomany, pivot, scope, repositories. It's very overwhelming, i'm trying to go over them one at a time.

Explain the Module Contact Form on Prestashop

I am reading Contact Form Module and although everything is very clear I can't understand why Configuration::updateValue( self::SEND_CONFIRMATION_EMAIL, Tools::getValue(self::SEND_CONFIRMATION_EMAIL) ); does not been saved on Configuration table...
Presta 1.7.7.0
Any suggestion?
Are you sure that you have checked the right row in the configuration table?
In the beginning of the contactform.php, is defined the constant
const SEND_CONFIRMATION_EMAIL = 'CONTACTFORM_SEND_CONFIRMATION_EMAIL';
So, if do you want to check the self::SEND_CONFIRMATION_EMAIL value, you need to search for CONTACTFORM_SEND_CONFIRMATION_EMAIL in table

Rename upload file in grocery crud

I am new in grocery crud, by the by is an incredible extension, congratulations ;)
the question is, I have one form and one field is a type File. I need change the name for the identify object, for example
.
I have the invoice table and one file field, i need when the user save the system should rename the file by id generate plus extension.
If I save the invoice number 18 i need save the file with name 18.pdf.
Thanks in advance.
Note: sorry by my english.
I found the solution
$crud->callback_after_insert(array($this, 'rename_img_db'));
public function rename_img_db($post_array,$primary_key){
//Here goes the get and set querys with your $primary_key
}

Magento: Add New Field to Credit Card Form

I'm trying to modify the credit card form to add some new custom fields named "Bank Name" and "Bank Phone Number" and it seems this cannot be done through the back-end.
I've searched the web and on here but I haven't been able to find anything in reference on how to add a new custom field to the credit card form. I would think it's almost the same as adding a new field to the customer registration form but I have no clue what to do database wise.
If anyone has anything I can use to work on this, I'd greatly appreciate it.
You should start by informing which version of Magento you are using and which methods you have already tried.
Without knowing that it is hard to help you, but you might want to try this possible solution, this one, or even one of these modules: Checkout Fields Manager or ADDITIONAL CHECKOUT ATTRIBUTES. If none of the above work, try this search.
No, Magento admin panel will not add custom columns for you. You need to do it yourself.
First, you need to edit the .phtml file to include these two fields to show up in frontend.
Second, you need to add two new columns (with same name as your fields, explained later) in relevant DB table (i guess sales_flat_order_payment). But that will affect for all payment methods, so define it something like VARCHAR(255) NULL.
Third, when Magento saves the CC info, you need to check if it is saving whole data array, then your field's name posted will match your table field and get inserted automatically. Else you need to edit it.
Also, next time please post some code, atleast something you have tried.

Resources