vat number required on Magento-2 checkout - magento2

How can I make the vat number required in the Magento-2 checkout?
I enabled the field as required from admin panel and now i want to make it required during checkout shipping step.
I have followed the steps described here but it is not working

This can be enabled via admin panel:
Stores > Configuration > Customer Configuration > Name and Address Options > Show Tax/VAT Number
The possible options are:
No
Optional
Required
On checkout
Now, other possibilities are :
1
If you navigate to:
Stores > Configuration > Customers > Customer Configuration > (Change
Scope to correct website/store view) > Create New Account Options >
Show VAT Number on Storefront
Change dropdown to Yes.
You'll then have to set up your tax classes/tax rules/customer groups and then in the above section you can assign the correct values to the groups.
http://docs.magento.com/m2/ce/user_guide/tax/vat-validation-configure.html
2 From Database
UPDATE `eav_attribute` SET `is_required` = '1' WHERE `eav_attribute`.`attribute_id` = 36;

Related

how to change woocommerce quantity field value from gravity forms field?

I've tried changing the value of the woocommerce quantity field from another field using gravityforms plugin with number field and calculations form, but didn't work. How to do it? Please help
In the Woocommerce product, if you have the WooCommerce Gravity Forms Product Add-Ons plugin activated, you can select the form you want to use, then in the Form Display at the bottom, you'll see advanced options. For Replace Modified Items? select Yes, for Quantity and Stock, select Yes, and then choose the field you want to populate the cart's quantity.
The advanced options will look for a number or quantity field to replace the woocommerce product quantity.

Preserve the records without value for measure in report

Aim: User wants to see all Auto's irrespective of Premium.
I created a tabular model for Auto Policies. Where an DimAuto is associated with FactPremium. However, there are cases in which an AutoItem Doesn't have a premium associated with it(the key for such AutoItems in FactPremium is 0 so that it can join to dimAuto). When browsing on excel I am not able to see the AutoItems that doesnt have premium associated with it in the Pivot Table.
I would like to know if there is any way to display every auto Items ?
In Excel, you can set this property in the PivotTable settings (Rows > Field Settings):
In PowerBI, this option is also available:
As alternative, you can adjust the measure, by adding 0 (zero)...
Sales plus 0 = SUM(Sales[Sales]) + 0
...or correct for blank values:
Sales if blank =
VAR Amount = SUM(Sales[Sales])
RETURN
IF (ISBLANK(Amount);0;Amount)

Jasper Reports summarize all groups before showing group details

Is there any way I can show total balances for all groups and then show details for each account?
For Example, Say I have 4 Accounts, I would like the following
Accounts Summary Header
Summary of Account A
Summary of Account B
Summary of Account C
Summary of Account D
Accounts Summary Footer
Account A Details...
Account B Details...
Account C Details...
Account D Details...
The report I am using now groups by the field that separates these accounts but is repeating in the following way:
Summary of Account A
Account A Details
Summary of Account B
Account B Details
...etc
I have thought of considering a subreport for the summary section but it would end up being the same query used for the details section which would make it redundant.
Jasper Studio has the idea of bands on which you drag and drop labels in the Design tab.
In general the solution would be to use Summary band, which would hold the details of accounts.
If you put everything in Detail 1 band, jasper will repeat that to fill all the page content and will not repeat them.
Also here you can find more details about the bands usage.
Quick info about the summary tab:
Summary
The summary band allows you to insert fields containing total
calculations, means, or any other information you want to include at
the end of the report.

Crystal Reports: Showing only first record in each group

I searched to get the required answer but not found exactly what iam looking for - please help me.
Please follow the steps i made in crystal report:
Using crystal report command (i created a query to get the required business number)
--> which gets 5 Business numbers
Note: Every business is having many receipt numbers (1st installment receipt, 2nd installment receipts... like that....) - these receipt details are stored in table_receipts.
In table_business - i have all details about business number, customer, product details...
Please understand the links:
table_business - table_customer - table_product - table_receipts
Relationship between tables are:
table_business.Bno=table_receipts.Bno
table_customer.Cno=table_customer.Cno
table_product.Pno=table_product.Pno
After creating the crystal report command; i just drag the required table in crystal report (table_business, table_customer,table_product,table_receipts)
Now i created a group for Business Number "BNo"
I need to display all the required details about that selected Business Number using parameter - its coming fine except receipts.
I mean its showing all receipts (all installment receipts). I need to display only the first receipt only (i.e: receipt number starst with letter "F" )
Hope you understand my requirement - Please help me in this regard.
Expecting your valuable reply.
Regards,
Sensa.
Here is what I tried for the same issue and it worked. It's a 2 step process involving using Running Total Fields and Suppressing in Section Expert.
First step is to create a Running Total Field (Right under Parameter Fields)
Right click on it and click New and name your field i.e. CountFirstOnly
On the left you will see the fields you can perform functions on.
Select the receipts field. Bring that over to field to summarize and select count.
Under Evaluate select For Each Record
Reset on Change of Group and select your grouping, in this case business number and click OK
Drag that field into your report.
Part 2: Section Expert
Bring up the section expert on details and click on the suppress X-2 button
Your formula should be: CountFirstOnly >1
Click OK
Refresh your report
Hopefully this did the trick.
You should be able to do this by creating a forumla for suppressing the field (table_receipts.Rno).
Right-click the {table_receipts.Rno} field and select Format Field...Common tab...Check the 'Suppress' box and then click the X-2 box to the right. When the new window appears paste this:
not ({table_receipts.Rno} startswith "F")
I might have a solution for you.
1)Open the ‘Report’ menu then select ‘Section Expert’
2)Select the ‘Details’ section from the left hand menu
3)Tick the ‘Suppress No Drill-Down’ option and click on the icon to the right of it and in the formula option put
4)RecordNumber > 1
This should suppress the whole ROW/Record and not just the field. I saw your problem from this thread, I needed the exact same solution and this worked.
show only in the first row in crystal reports details section
It sounds as though the simplest way to meet this requirement would be to add a selection condition to the report - something like:
Left({table_receipts.Rno},1) = "F"
This should ensure that only the associated products and customers for the first receipt for each business are reported.

Pass variable cart total to PayPal for Subscription (using Enhanced Recurring Payments w. Website Payments Standard)

Summary: Trying to pass along a variable Monthly Subscription cost to PayPal based on user-selected options on a form I created. Working within Website Payments Standard with Enhanced Recurring Payment option, is this possible?
Details:
User visits "shop" page, which is a form with 4 line items, each line item consisting of 2-7 options, each option with an associated price.
For example, line item 1 is "size of business" with the options being:
a) 1-3 employees - $10
b) 4+ employees - $12.50
User goes through the list and chooses 1 option for each line item and some javascript calculates the total due on the fly.
Is it possible to pass this total to PayPal, not as a one-time cost, rather as the base cost for a monthly subscription?
Yes. Just change the value you're passing for a3, rather than amount.
Is there a problem you're running into?