[Vtigercrm-commits] [Vtiger development] #8360: Import Duplicate Handling (Step3) for Inventory Modules
Vtiger development
vtiger-tickets at trac.vtiger.com
Sat Dec 6 10:54:52 GMT 2014
#8360: Import Duplicate Handling (Step3) for Inventory Modules
-------------------------+-------------------------------------------------
Reporter: mathdesc | Owner: mathdesc
Type: known issue | Status: new
Priority: major | Milestone: Unassigned
Component: vtigercrm | Version:
Severity: High | Keywords:
| import,duplicate,invoice,salesorder,
-------------------------+-------------------------------------------------
Since ages the Import module has been greatly reworked and upgraded but
the import process Step 3 "criteria settings for record handling"
(RECORD_DUPLICATE_HANDLING)
has never been enabled for Quotes, Invoices, Salesorders and Purchaseorder
(aka Inventory modules)
Users would want it notably for example to prevent auto_merge on the
subject of invoices.
Actually if subject is matching across the invoice batch then it
automatically merges the records,
into one invoice, leading to a huge inconsistency.
That is a design flaw, why would a invoice subject should be unique in the
first place ? Just like database's tables primary keys, vtdevs should fix
those design issues. To me a invoice is unique with subject, date and
total as primary key.
Nevertheless with Step 3, one could overcome this and drive the merge
process during import with more resilient criterion. But since
DUPLICATE_HANDLING_NOT_SUPPORTED is, step 3 is force-disabled.
layouts/vlayout/modules/Import/ImportBasicStep.tpl : 42
{{{
#!div style="font-size: 90%"
Code highlighting:
{{{#!php
{if $DUPLICATE_HANDLING_NOT_SUPPORTED neq 'true'}
<tr>
<td class="leftFormBorder1 importContents" colspan="2"
valign="top">
{include
file='Import_Step3.tpl'|@vtemplate_path:'Import'}
</td>
</tr>
{/if}
}}}
}}}
modules/Vtiger/views/Import.php :89
{{{
#!div style="font-size: 90%"
Code highlighting:
{{{#!php
//Duplicate records handling not supported for inventory moduels
$duplicateHandlingNotSupportedModules =
getInventoryModules();
if(in_array($moduleName,
$duplicateHandlingNotSupportedModules)){
$viewer->assign('DUPLICATE_HANDLING_NOT_SUPPORTED', true);
}
//End
}}}
}}}
vtigercrm/include/utils/utils.php :1992
{{{
#!div style="font-size: 90%"
Code highlighting:
{{{#!php
function getInventoryModules() {
$inventoryModules =
array('Invoice','Quotes','PurchaseOrder','SalesOrder');
return $inventoryModules;
}
}}}
}}}
Of course force enabling produce a total import failure.
Here is the details as a recap / scope / how to reproduce :
- http://lists.vtigercrm.com/pipermail/vtigercrm-
developers/2014-June/027207.html
- http://lists.vtigercrm.com/pipermail/vtigercrm-
developers/2014-June/027266.html
- http://lists.vtigercrm.com/pipermail/vtigercrm-
developers/2014-July/027361.html
- http://lists.vtigercrm.com/pipermail/vtigercrm-
developers/2014-July/027361.html
Here is various resource to address the issue :
- https://wiki.vtiger.com/index.php/Vtiger_6_Developer_Guide
- https://www.vtiger.com/products/crm/help/5.2.0/VtigerCRM_5.2.0_Vtlib.pdf
- https://wiki.vtiger.com/index.php/Developer_Debug_Techniques
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8360>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list