# Dev bulletin 11/15

Currently there's a difference between FE and BE MS orders:

- for FE MS orders, the sales-ship-item stores product id of configurable-product; and store the SKU of the simple-product.
- for BE MS orders, the sales-ship-item stores product id of simple-product; and store SKU of the simple-product  
      
    Example: right is front-end, left is back-end. Same product orders; but data stored differently in database

[![image.png](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-11/scaled-1680-/image.png)](https://frdocs.socalappsolutions.com/uploads/images/gallery/2025-11/image.png)

To address this difference; in reports; we currently need to UNION two queries. For example, ItemsOnOrderByItem: app/code/Frans/AdminReport/Controller/Adminhtml/Action/ItemsOrdByItemCsv.php

Query:

> \# First set, pull from configurable prod. Because FE MS orders has sales\_shipment\_item storing prod-id of CONFIGURABLE PROD, we need to union this set. In the  
> \# future we might want to rewrite either FE or BE to make sure they are consistent  
> SELECT  
> \# ,ss.entity\_id,o.updated\_at, o.entity\_id,ssi.product\_id  
> max(ssi.parent\_id) example\_shipment\_id,max(ssi.product\_id) example\_product\_id  
> ,ssi.sku as prod\_sku,max(ce\_vc.value) as product\_name # 9/27  
>  ,max(aovcolor.value) color\_title  
>  ,sum(ssi.qty) quantity #9/27 pull qty from configurable prod
> 
> FROM sales\_shipment\_item ssi  
> JOIN catalog\_product\_entity pconf ON pconf.entity\_id=ssi.product\_id AND pconf.type\_id ='configurable'
> 
> UNION  
> \## Second set, pull from simple prod  
> SELECT  
> \# ,ss.entity\_id,o.updated\_at, o.entity\_id,ssi.product\_id  
> max(ssi.parent\_id) example\_shipment\_id,max(ssi.product\_id) example\_product\_id  
> ,ssi.sku as prod\_sku,max(ce\_vc.value) as product\_name # 9/27  
>  ,max(aovcolor.value) color\_title  
>  ,sum(COALESCE(ssi\_conf.qty,ssi.qty)) quantity #9/27 pull qty from configurable prod, if any
> 
> FROM sales\_shipment\_item ssi  
> JOIN catalog\_product\_entity psimp ON psimp.entity\_id=ssi.product\_id AND psimp.type\_id ='simple'

Because FE MS orders has sales\_shipment\_item storing prod-id of CONFIGURABLE PROD, we need to union. In the future we might want to rewrite either FE or BE to make sure they are consistent.