Commit Graph

23 Commits

Author SHA1 Message Date
Joshua T Flowers f0ec3c49a1 Add tax refund calculations (https://github.com/woocommerce/woocommerce-admin/pull/1556)
* Add item and shipping refund calucations to taxes on order update

* Sync taxes on refund delete

* Fix up tax stats API testing

* Add refunds to tax stats API tests
2019-02-18 10:20:16 +08:00
Peter Fabian a6761fc606 Merge branch 'master' into fix/489-date_date_gmt 2019-02-10 17:24:54 +01:00
Peter Fabian d71225d7d1 Use default after and before parameter values if no values are provided by the user. 2019-02-10 17:16:43 +01:00
Peter Fabian b3c3aca973 Centralized default before and after parameters. 2019-02-10 17:07:45 +01:00
Peter Fabian 5fbf5b62d7 Normalize datetimes before doing any further processing with the input from the user.
Also, passing DateTime objects around instead of string so that timezone info can be easily attached to it.
2019-02-08 18:11:04 +01:00
Peter Fabian b70a166f1d Store datetimes in local time instead of UTC. 2019-02-08 18:01:44 +01:00
Jeff Stieler 300069234a Add comments to explain we are skipping `shop_order_refund` types when syncing stats for coupons and taxes. 2019-02-07 18:41:40 -08:00
Jeff Stieler 56a1a30224 Skip processing `shop_order_refund`s when syncing coupon and tax lookup tables. 2019-02-06 19:15:06 -08:00
Claudio Sanches 86c3c00480 Clean tables when order is deleted 2019-02-05 16:15:39 -02:00
Claudio Sanches 10f40d4cf3 Merge branch 'master' into fix/1307 2019-02-05 15:48:59 -02:00
Claudio Sanches e0004eb461 Merge branch 'master' into feature/754 2019-02-05 15:42:34 -02:00
Claudio Sanches 58cdf6a7f9 Fixed hook names 2019-02-04 16:02:49 -02:00
Claudio Sanches a1976bc1bc Improve action/hook naming 2019-02-04 15:58:37 -02:00
Jeff Stieler 11d18a8b5b Queue individual order syncing instead of handling immediately. 2019-02-04 09:18:49 -07:00
Jeff Stieler 9f3c95ae63 Rework lookup table data store sync methods to return a meaningful status. 2019-02-04 09:09:44 -07:00
Claudio Sanches 707067e255 Docblocks 2019-02-01 17:02:15 -02:00
Claudio Sanches cd55051da3 New actions for when deleting objects from database 2019-02-01 16:29:14 -02:00
Claudio Sanches 68e0c98828 New action name: woocommerce_delete_reports_order_stats 2019-02-01 16:10:00 -02:00
Claudio Sanches 07f3f33566 Introduced new hooks for jetpack sync 2019-02-01 15:43:24 -02:00
Claudio Sanches b0b506b397 Introduced new methods to clean up data when an order is deleted 2019-01-29 19:13:06 -02:00
Joshua T Flowers 33a7cfa1b0 Store all order statuses (https://github.com/woocommerce/woocommerce-admin/pull/1285)
* Store all orders regardless of status in wc_order_stats

* Only query select statuses if status_is or status_is_not is not set

* Fix order stats example query

* Filter category store by default order statuses

* Add table_name to interval functions to avoid ambiguity

* Filter coupon store by default order statuses

* Fix interval stats by adding table_name to interval function

* Filter products store by default order statuses

* Remove unused order_status in coupons data store

* Store products with any order status

* Fix ambiguous order by call in products data store

* Apply status filter after other filters to avoid logical OR matching

* Store all coupon data regardless of order status

* Filter taxes by default order statuses

* Filter customer stats by default order status

* Filter default order statuses in variations data store

* Use excluded statuses to filter reports by default

* DRY up default excluded statuses query

* Fix up new orders data store after rebase
2019-01-16 10:23:00 +08:00
Joshua T Flowers b3979ff984 Fix order status product sync (https://github.com/woocommerce/woocommerce-admin/pull/1151)
* Move order product sync to product data store

* Move order taxes sync to taxes data store

* Move order coupons sync to coupons data store

* Use table_name constant in data syncs

* Remove order data for incomplete order statuses

* Fix report rebuild tool

* Update comments to describe create/update entry reference

* Fix data_store_init function name change
2018-12-27 11:49:00 +08:00
Joshua T Flowers 04d3ce6eb1 Add taxes endpoint and data store (https://github.com/woocommerce/woocommerce-admin/pull/1000)
* Add taxes endpoint and data store

* Add sorting options and normalize orderby param

* Add report taxes unit tests

* Add tax rate to response

* Add country, state, priority, and name to response

* Fix tax codes query param

* Add class comment

* Add missing  to record query

* Add comment about ambiguous column
2018-12-11 08:58:05 +08:00