Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012586Openbravo ERP08. Project and service managementpublic2010-03-08 09:012010-03-16 11:34
networkb 
adrianromero 
urgentmajorhave not tried
closedfixed 
5
2.50MP12 
2.50MP14 
Core
No
0012586: The way to pay the expeses of the employee is creating an invoice what is not correct
The way to pay the expeses of the employee is creating an invoice what is not correct.
This invoices are showed on the invoice register book, what in not legal.

-Insert an expense (not time expense) for an employee and process it
-Go to the "create ap invoices" process
-Fill the form to create the invoice for the previous expense.
Instead of create an invoice, create a manual settlement to paid the customer,
assigning to the settlement the project of the expense.
In this way the project profitability report should be changed to take into account this settlements.
No tags attached.
related to defect 00120142.50MP14 closed adrianromero Error in Project Profitability 
related to backport 00157882.50MP27 closed adrianromero the system is blocked when run Create AP Expense Invoices 
Issue History
2010-03-08 09:01networkbNew Issue
2010-03-08 09:01networkbAssigned To => adrianromero
2010-03-08 16:05jpabloaeTarget Version2.50MP14 => 2.50MP15
2010-03-08 17:22pjuvaraNote Added: 0025148
2010-03-08 18:18adrianromeroStatusnew => scheduled
2010-03-08 18:18adrianromeroNote Added: 0025150
2010-03-08 18:18adrianromerofix_in_branch => pi
2010-03-11 10:39networkbTarget Version2.50MP15 => 2.50MP14
2010-03-11 10:39networkbfix_in_branchpi =>
2010-03-11 10:53psarobeNote Added: 0025236
2010-03-11 17:50hgbotCheckin
2010-03-11 17:50hgbotNote Added: 0025246
2010-03-11 17:50hgbotStatusscheduled => resolved
2010-03-11 17:50hgbotResolutionopen => fixed
2010-03-11 17:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8b436aa61995d1a4ed26dd5110efa109025598b2 [^]
2010-03-11 17:55adrianromeroNote Added: 0025247
2010-03-11 18:11hgbotCheckin
2010-03-11 18:11hgbotNote Added: 0025250
2010-03-11 18:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8b436aa61995d1a4ed26dd5110efa109025598b2 [^] => http://code.openbravo.com/erp/devel/pi/rev/a0a6f1333eec22a330aa1b6d5ee5cfe375de2f42 [^]
2010-03-12 22:41hudsonbotCheckin
2010-03-12 22:41hudsonbotNote Added: 0025430
2010-03-12 22:41hudsonbotCheckin
2010-03-12 22:41hudsonbotNote Added: 0025431
2010-03-15 19:08psarobeNote Added: 0025493
2010-03-15 19:08psarobeStatusresolved => closed
2010-03-16 00:00anonymoussf_bug_id0 => 2970941
2010-03-16 11:33rafarodaIssue Monitored: rafaroda
2010-03-16 11:34rafarodaRelationship addedrelated to 0012014
2011-01-27 10:52malsasuaRelationship addedrelated to 0015788

Notes
(0025148)
pjuvara   
2010-03-08 17:22   
An alternative solution is to clearly label this type of invoices and make sure they are not included in the tax reports.
(0025150)
adrianromero   
2010-03-08 18:18   
The proposed solution to this issue is to create a new flag in the document types table called "is employee expenses", and modify the Create AP invoices process to create a document of type of the document type with this flag active and if it does not exist any document type with this flag active then follow the current flow.

This way the user must create a new document type for employee expenses with this new flag active and then the Create AP invoices process will create new documents with this new document type and then it will not appear in the invoice register book because the document type for employees expenses will be new.
(0025236)
psarobe   
2010-03-11 10:53   
Adrian, it could happen that you have marked more than one so let's use max(). Take into account the organization of the document type
(0025246)
hgbot   
2010-03-11 17:50   
Repository: erp/devel/pi
Changeset: 8b436aa61995d1a4ed26dd5110efa109025598b2
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Mar 11 17:55:12 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8b436aa61995d1a4ed26dd5110efa109025598b2 [^]

Fixes issue 0012586: The way to pay the expeses of the employee is creating an invoice what is not correct

---
M src-db/database/model/tables/C_DOCTYPE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice_data.xsql
A src-db/database/model/functions/AD_GET_DOCTYPE_EXPENSES.xml
---
(0025247)
adrianromero   
2010-03-11 17:55   
To test this issue. Create a new document type for expenses, but with the Expense flag activated.

When running the "Create AP invoices" process it will generate invoices with the new document type created and then it will not appear in the Invoice Register Book.
(0025250)
hgbot   
2010-03-11 18:11   
Repository: erp/devel/pi
Changeset: a0a6f1333eec22a330aa1b6d5ee5cfe375de2f42
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Mar 11 18:17:39 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a0a6f1333eec22a330aa1b6d5ee5cfe375de2f42 [^]

Fixes issue 0012586: The way to pay the expeses of the employee is creating an invoice what is not correct
Fixing copyright notice in function file

---
M src-db/database/model/functions/AD_GET_DOCTYPE_EXPENSES.xml
---
(0025430)
hudsonbot   
2010-03-12 22:41   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/8b436aa61995 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0025431)
hudsonbot   
2010-03-12 22:41   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/a0a6f1333eec [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]
(0025493)
psarobe   
2010-03-15 19:08   
tested working fine