Jump to content

Delivery State in Sales Reports Needed Due to Tax Setting


Dirty Butter

Recommended Posts

We had a recent situation where someone living in our state had an item delivered to another state. On checking the Sales Report for this month, I see that it showed the State as being Alabama, when it should have shown Arkansas for tax purposes. I changed reports.index.php from <td>{$data.state}</td> to <td>{$data.state_d}</td>. The report appears to be correct now for our needs.

This is important for someone like us, where sales tax is figured on the delivery state, in that we need an accurate tax record.

It looks like this is a bug. But I think my change needs to be more elegant, based on tax on billing or on delivery state. Any thoughts on this?

Link to comment
Share on other sites

So, according to what you have said, in your Store Settings, General tab, you should have "Tax Customer by" => Delivery Address.

 

Calculated taxes (assuming no other computational bugs) should then be reflected accurately and shown on each order's Order Summary as recorded in the CC_order_summary database table. So, the Sales Report Total Tax column should also be accurate, as would the sum totals at the bottom of the table.

 

I agree that it is misleading in the Sales Report to see a State and Country columns but not know the context: Billing or Delivery (or something else if a mod is in use).

 

Because the controller script, reports.index.inc.php, makes available both billing and delivery, perhaps changing the Sales Report table, in reports.index.php, to show:

          <td>{$LANG.order_state.tab_billing} {$LANG.address.state}/{$LANG.address.country}</td>
          <td>{$LANG.order_state.tab_delivery} {$LANG.address.state}/{$LANG.address.country}</td>
 
          <td>{$data.state}/{$data.country}</td>
          <td>{$data.state_d}/{$data.country_d}</td>

and add a style to the column if that column represents the configuration setting: {if $CONFIG.basket_tax_by_delivery eq true}style{/if}.
 

Or, based on the config setting, show only what needs to be shown.

Link to comment
Share on other sites

I didn't make a change in reports.index.inc.php. I ended up with this on reports.index.php:

<!-- SHOWS DELIVERY STATE, COUNTRY IF TAX BASED ON DELIVERY ADDRESS -->
{if $CONFIG.basket_tax_by_delivery eq true}

		  <td>{$data.country_d}</td>
		  <td>{$data.state_d}</td> 
{else}
 <td>{$data.country}</td>
 <td>{$data.state}</td>
{/if}
<!-- END SHOWS DELIVERY STATE, COUNTRY IF TAX BASED ON DELIVERY ADDRESS -->
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...