Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 导入发票时出现严重错误-VTiger_Php_Mysql_Vtiger - Fatal编程技术网

Php 导入发票时出现严重错误-VTiger

Php 导入发票时出现严重错误-VTiger,php,mysql,vtiger,Php,Mysql,Vtiger,我们有一个正在工作的vTiger应用程序,它已经有数百张发票。我们现在需要进口所有的旧发票(当然,大约4500张发票及其所有产品和装运地址) 我创建了一个脚本,用于读取所有旧发票,并执行以下操作: - adds a new crmentity to the vtiger_crmentity table - adds a new invoice to the vtiger_invoice table - adds a new shipping address to the vtiger_invoi

我们有一个正在工作的vTiger应用程序,它已经有数百张发票。我们现在需要进口所有的旧发票(当然,大约4500张发票及其所有产品和装运地址)

我创建了一个脚本,用于读取所有旧发票,并执行以下操作:

- adds a new crmentity to the vtiger_crmentity table
- adds a new invoice to the vtiger_invoice table
- adds a new shipping address to the vtiger_invoiceshipads
- adds a new billing address to the vtiger_invoicebillads
- adds all products to the vtiger_inventoryproductrel
到目前为止还不错。起初,所有信息似乎都导入正常,并且所有信息都正确显示在发票中

然而,在尝试保存新发票后,我遇到了一些似乎相关的问题:

  • 尝试(手动)创建新发票时,它看起来好像正在保存,但随后,它显示的不是新发票,而是最后一张发票。我检查了mysql表,似乎根本没有创建新的crmentity。
    • 有时在尝试保存时,它会尝试下载
      index.php
      ,而不是保存
我认为这可能与
发票编号
(自定义发票排序)有关,因为导入时,我将发票编号列留空

导入时,我还没有修改
vtiger\u modentity\u num
表,它是否相关

在我的场景中是否有其他表/字段需要修改

任何帮助都将不胜感激


谢谢。

还编写了一个自定义导入程序,对此没有任何问题,但您是如何创建CRM实体id的?你能提供一些代码吗?我使用了这个
$crmEntityId=$adb->getUniqueID('vtiger\u crmentity')。后来在下表中插入了:vtiger_crmentity、vtiger_inventoryshippingrel、vtiger_Invoiceshippads、vtiger_Invoicesillads、vtiger_invoice、vtiger_Invoicescf、vtiger_InventorySProductrel也编写了一个自定义导入程序,没有任何问题,但如何创建CRM实体id?你能提供一些代码吗?我使用了这个
$crmEntityId=$adb->getUniqueID('vtiger\u crmentity')。后来在下表中插入了:vtiger_crmentity、vtiger_inventoryshippingrel、vtiger_Invoiceshippads、vtiger_Invoicesillads、vtiger_invoice、vtiger_Invoicescf、vtiger_InventorySProductrel也编写了一个自定义导入程序,没有任何问题,但如何创建CRM实体id?你能提供一些代码吗?我使用了这个
$crmEntityId=$adb->getUniqueID('vtiger\u crmentity')。后来在下表中插入了:vtiger\u crmentity、vtiger\u inventoryshippingrel、vtiger\u Invoiceshippad、vtiger\u Invoicesillads、vtiger\u invoice、vtiger\u Invoicescf、vtiger\u InventorySProductrel