View Issue Details

IDProjectCategoryView StatusLast Update
0000691OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:45
Reportersigmarkress Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionwon't fix 
Summary0000691: OXTOTALNETSUM, OXTOTALBRUTSUM and OXTOTALORDERSUM are filled with 0
DescriptionAfter update.sql the entries from old orders (pe3.0.4.1 or ee) (in fields OXTOTALNETSUM, OXTOTALBRUTSUM and OXTOTALORDERSUM) are filled with 0.
The value is wrong.
TagsNo tags attached.
Attached Files
db.jpg (14,068 bytes)   
db.jpg (14,068 bytes)   
Theme
BrowserAll
PHP Version5.2.3
Database Version5.0.33

Activities

sigmarkress

2009-03-13 10:57

reporter   ~0000567

@dainius_bigelis
from version PE 3.0.4.1 to PE 4.0.0.1

dainius.bigelis

2009-03-14 19:06

reporter   ~0000574

Reminder sent to: sigmarkress

Hi,

These columns are made only for external use only (if there are some special modules written), and are not used by general eShop source code.
So we are planning to drop these columns in some next Major eShop version release (in future).

dainius.bigelis

2009-03-14 19:07

reporter   ~0000575

Columns are made only for user convenience and not used by eShop source code. Columns will be droped in some next Major version release.

sigmarkress

2009-03-16 13:03

reporter   ~0000582

Last edited: 2009-03-16 13:07

hi,
in "core/oxorder.php" on line 1578 you use the field oxorder__oxtotalbrutsum for "$this->ftotalbrutsum"

and in out/admin/tpl/order_overview.tpl you use "$edit->ftotalbrutsum"

Old orders are filled with 0 an new Orders are okay!

dainius.bigelis

2009-03-16 17:05

reporter   ~0000585

@Developers: please check the refered source code places, if these columns are realy used by eShop source code.
If used - need to discuss about the purpose of these columns (is it necessary for eShop or only made forexternal use).

sigmarkress

2009-03-26 23:02

reporter   ~0000647

and???

arvydas_vapsva

2009-04-02 14:47

reporter   ~0000683

Reminder sent to: sigmarkress

These fields after update were left empty because precise calculation is not possible. If you still need to have at least some close to real values, here is an update query:

UPDATE `oxorder` AS _main SET _main.oxtotalordersum = _main.oxdelcost + _main.oxpaycost + _main.oxwrapcost - _main.oxdiscount + ( SELECT SUM( oxbrutprice ) FROM `oxorderarticles` WHERE oxorderid = _main.oxid ), _main.oxtotalbrutsum = ( SELECT SUM( oxbrutprice ) FROM `oxorderarticles` WHERE oxorderid = _main.oxid ), _main.oxtotalnetsum = ( SELECT SUM( oxnetprice ) FROM `oxorderarticles` WHERE oxorderid = _main.oxid ) WHERE _main.oxtotalnetsum = 0 AND _main.oxtotalbrutsum = 0 AND _main.oxtotalordersum = 0;

arvydas_vapsva

2009-04-02 14:54

reporter   ~0000684

NOTICE:

query fill up values for all three fiels, by writing:

oxtotalnetsum = order articles net price sum
oxtotalbrutsum = order articles brut price sum
oxtotalordersum = delivery costs + payment costs + wrapping costs - discount value + order articles brut price sum

dainius.bigelis

2009-04-02 14:59

reporter   ~0000685

The problem is only in the orders, which habe been made in old version and remain in shop after upgrade to new version. With orders, made in eShop v.4 there are no such problems.
This may be solved by executing the SQL query once (see comments above) and no general fix in the shop is needed.