Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027454
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Tax Exemptminorhave not tried2014-08-24 22:262015-02-09 16:23
ReportermtaalView Statuspublic 
Assigned Tomarvintm 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix in branchpiFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027454: Tax Exempt module does not work with q4 version, sql replacement seems to simple

DescriptionI found 2 problems.
First:
I changed a line to this, this seems to work, the original line in the modeule is this:
https://code.openbravo.com/erp/pmods/org.openbravo.retail.taxexempt/file/d46b6b9cc1fc/web/org.openbravo.retail.taxexempt/js/taxExemptButton.js#l80 [^]
I changed it to this:
  if (componentHolder && componentHolder.name === 'defaultEdit' && componentHolder.components[0] && componentHolder.components[0].name === 'msgedit' && componentHolder.components[0].components[0] && componentHolder.components[0].components[0].components && componentHolder.components[0].components[0].components.push) {

But this must be validated.

Second:
This code:
  OB.UTIL.HookManager.registerHook('OBPOS_FindTaxRate', function (args, callbacks) {
    if (args.context.get('bp').get('taxExempt')) {
      args.line.set('taxExempt', true);
    } else if (args.line.get('taxExempt')) {
      args.sql = "select * from c_tax where istaxexempt = 'true' order by validfrom desc limit 1";
    }
    OB.UTIL.HookManager.callbackExecutor(args, callbacks);
    return;
  });

Fails because the args does not have a property line. This got solved in this push:
http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ad8bc428c9f8318c2953ecd4d441551c507414a5 [^]

A bigger problems seems to be that the sql replacement proposed above does not seem to be correct, the sql query which gets replaced is really big and the replacement does not seem to cover all cases, it seems better to add the istaxexempt=true to the query.

So this issue is 2 things:
- validate that the first topic has been solved correctly
- check the sql replacement
Steps To ReproduceInstall taxexempt module with the q4 version and run it.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on defect 0027455RR14Q4 closedmtaal OBPOS_FindTaxRate hooks also need the line for which they are executed 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-08-24 22:26 mtaal New Issue
2014-08-24 22:26 mtaal Assigned To => malsasua
2014-08-24 22:26 mtaal Triggers an Emergency Pack => No
2014-08-24 22:36 mtaal Summary Tax Exempt module does not work with q4 version => Tax Exempt module does not work with q4 version, sql replacement seems to simple
2014-08-24 22:36 mtaal Description Updated View Revisions
2014-08-24 22:36 mtaal Steps to Reproduce Updated View Revisions
2014-08-24 22:36 mtaal Relationship added depends on 0027455
2014-09-22 16:22 mtaal Target Version RR14Q4 =>
2015-02-05 16:50 mario_castello Assigned To malsasua => mario_castello
2015-02-05 16:50 mario_castello Status new => scheduled
2015-02-05 16:50 mario_castello fix_in_branch => pi
2015-02-09 16:23 mario_castello Assigned To mario_castello => marvintm


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker