Add php files
This commit is contained in:
68
modules/EcmInsideOrders.cp/ActionsAccess.php
Executable file
68
modules/EcmInsideOrders.cp/ActionsAccess.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
$actions_access => array (
|
||||
'user_manager_role' => array (
|
||||
's10' => true,
|
||||
's20' => false,
|
||||
's30' => true,
|
||||
's40' => true,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
),
|
||||
'user_representative_extra_role' => array (
|
||||
's10' => array('if'=>array('s40')),
|
||||
's20' => false,
|
||||
's30' => true,
|
||||
's40' => false,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
),
|
||||
'user_representative_role' => array (
|
||||
'list' => true,
|
||||
'index' => true,
|
||||
case 'listview':
|
||||
return ACLController::checkAccess($this->module_dir,'list', true);
|
||||
case 'edit':
|
||||
return (ACLController::checkAccess($this->module_dir,'edit', $is_owner) && ($this->status == "s10" || $this->status == "s40"));
|
||||
case 'save':
|
||||
case 'popupeditview':
|
||||
case 'editview':
|
||||
return (ACLController::checkAccess($this->module_dir,'edit', $is_owner));
|
||||
case 'view':
|
||||
case 'detail':
|
||||
case 'detailview':
|
||||
return ACLController::checkAccess($this->module_dir,'view', $is_owner);
|
||||
case 'delete':
|
||||
return (ACLController::checkAccess($this->module_dir,'delete', $is_owner) && $this->status == "s10");
|
||||
case 'export':
|
||||
return ACLController::checkAccess($this->module_dir,'export', $is_owner);
|
||||
case 'import':
|
||||
return ACLController::checkAccess($this->module_dir,'import', true);
|
||||
case 'quote_to_sale':
|
||||
case 'quote_to_invoice':
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40" && $this->status != "s60");
|
||||
case 'send_to_confirm':
|
||||
return ($this->status == "s10");
|
||||
case 'send_email':
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
case 'can_commit':
|
||||
return false;
|
||||
case 'confirming':
|
||||
return false;
|
||||
case 'auto_commiting':
|
||||
return false;
|
||||
),
|
||||
'admin' => array(
|
||||
's10' => true,
|
||||
's20' => false,
|
||||
's30' => true,
|
||||
's40' => true,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
8
modules/EcmInsideOrders.cp/AjaxSearch/AjaxSearch.php
Executable file
8
modules/EcmInsideOrders.cp/AjaxSearch/AjaxSearch.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
75
modules/EcmInsideOrders.cp/AjaxSearchQuery.php
Executable file
75
modules/EcmInsideOrders.cp/AjaxSearchQuery.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
if(isset($_REQUEST['as_inputSearch']) && $_REQUEST['as_inputSearch'] != '') {
|
||||
$AS_INPUTSEARCH = strtoupper($_REQUEST['as_inputSearch']);
|
||||
|
||||
$query = "SELECT DISTINCT";
|
||||
$query .= " `pr`.`id`";
|
||||
$query .= ", `pr`.`unit_id` as unitid";
|
||||
$query .= ", `pr`.`code`";
|
||||
$query .= ", `pr`.`name`";
|
||||
$query .= ", `pr`.`selling_price`";
|
||||
$query .= ", `pr`.`ems_price`";
|
||||
$query .= ", `pr`.`purchase_price`";
|
||||
$query .= ", `pr`.`vat_id`";
|
||||
$query .= ", `pr`.`vat_name`";
|
||||
$query .= ", `pr`.`vat_value`";
|
||||
$query .= ", `pr`.`exchange_rate_id` as `currency_id`";
|
||||
$query .= ", `pr`.`product_category_id` as `category_id`";
|
||||
$query .= ", `pr`.`usage_unit_id` as `unit_id`";
|
||||
$query .= ", `pr`.`carton_dimensions_1` as `cd1`";
|
||||
$query .= ", `pr`.`carton_dimensions_2` as `cd2`";
|
||||
$query .= ", `pr`.`carton_dimensions_3` as `cd3`";
|
||||
$query .= ", `pr`.`pieces_per_carton` as `ppc`";
|
||||
$query .= ", `pr`.`moq` as `moq`";
|
||||
|
||||
|
||||
$query .= " FROM";
|
||||
$query .= " `ecmproducts` as `pr`";
|
||||
|
||||
$query .= " WHERE";
|
||||
$query .= " (";
|
||||
$query .= "UPPER(`pr`.`code`) LIKE '%$AS_INPUTSEARCH'";
|
||||
$query .= " || UPPER(`pr`.`code`) LIKE '$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr`.`code`) LIKE '%$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr`.`name`) LIKE '%$AS_INPUTSEARCH'";
|
||||
$query .= " || UPPER(`pr`.`name`) LIKE '$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr`.`name`) LIKE '%$AS_INPUTSEARCH%'";
|
||||
$query .= ")";
|
||||
$query .= " AND `pr`.`deleted`='0'";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
|
||||
global $sugar_config;
|
||||
$defaultCurrency = $sugar_config['default_currency_symbol'];
|
||||
$currencies = array ( -99 => $defaultCurrency );
|
||||
|
||||
$arr = array();
|
||||
if($result)
|
||||
while($row = $GLOBALS['db']->fetchByAssoc($result)) {
|
||||
$row['guid']=create_guid();
|
||||
$row['price'] = $row['ems_price'];
|
||||
$row['quantity']=(int)$row['moq'];
|
||||
$w=$GLOBALS['db']->query("select c.ecmproduct_id as product_id,c.ecmcomponent_id as id,c.name,c.code,c.quantity, p.product_category_id as cat, p.purchase_price as price from ecmproductcomponents as c INNER JOIN ecmproducts as p ON p.id=c.ecmcomponent_id where c.ecmproduct_id='".$row['id']."' and c.deleted='0'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$r['component']=1;
|
||||
$r['guid']=$row['guid'];
|
||||
$r['component_quantity']=$r['quantity'];
|
||||
$r['category_id']=$r['cat'];
|
||||
|
||||
$row['components'][]=$r;
|
||||
}
|
||||
if(array_key_exists($row['currency_id'],$currencies))
|
||||
$row['currency_symbol'] = $currencies[$row['currency_id']];
|
||||
$arr[] = $row;
|
||||
}
|
||||
|
||||
if(count($arr) > 0) {
|
||||
$json = getJSONobj();
|
||||
echo str_replace(""", '\"', $json->encode($arr));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['MyEcmInsideOrdersDashlet']['searchFields'] = array('name' => array('default' => ''),
|
||||
//'status' => array('default' => array('Not Started', 'In Progress', 'Pending Input')),
|
||||
'date_entered' => array('default' => ''),
|
||||
//'date_start' => array('default' => ''),
|
||||
//'date_due' => array('default' => ''),
|
||||
|
||||
|
||||
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyEcmInsideOrdersDashlet']['columns'] = array(
|
||||
'STATUS' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_STATUS',
|
||||
'default' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
'DOCUMENT_NO' => array(
|
||||
'width' => '8',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
),
|
||||
'NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_NAME',
|
||||
'sortable' => true,
|
||||
'link' => false,
|
||||
//'customCode' => '<a href="index.php?module=EcmInsideOrders&action=EditView&record={$ID}">{$NAME}</a>',
|
||||
'default' => true,
|
||||
),
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_PARENT_NAME',
|
||||
'default' => true,
|
||||
),
|
||||
'TOTAL' => array(
|
||||
'width' => '2',
|
||||
'label' => 'LBL_TOTAL',
|
||||
'default' => true,
|
||||
'align' => 'right',
|
||||
),
|
||||
'OPTIONS' => array(
|
||||
'width' => '5',
|
||||
'label' => ' ',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'right',
|
||||
),
|
||||
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyEcmInsideOrdersDashlet'] = array('module' => 'EcmInsideOrders',
|
||||
'title' => translate('LBL_DASHLET_MY_ECMINSIDEORDERS', 'EcmInsideOrders'),
|
||||
'description' => 'A customizable view into Quotes',
|
||||
'icon' => 'themes/default/images/EcmInsideOrders.gif',
|
||||
'category' => 'Module Views');
|
||||
?>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
|
||||
class MyEcmInsideOrdersDashlet extends DashletGeneric {
|
||||
function MyEcmInsideOrdersDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/EcmInsideOrders/Dashlets/MyEcmInsideOrdersDashlet/MyEcmInsideOrdersDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_DASHLET_MY_ECMINSIDEORDERS', 'EcmInsideOrders');
|
||||
|
||||
$this->searchFields = $dashletData['MyEcmInsideOrdersDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyEcmInsideOrdersDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new EcmInsideOrder();
|
||||
$this->lvs->quickViewLinks = false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
142
modules/EcmInsideOrders.cp/Delete.php
Executable file
142
modules/EcmInsideOrders.cp/Delete.php
Executable file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
|
||||
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
|
||||
|
||||
// PERFORM THE DELETE IF GIVEN A RECORD TO DELETE
|
||||
|
||||
if(!isset($_REQUEST['record']))
|
||||
|
||||
sugar_die("A record number must be specified to delete the record.");
|
||||
|
||||
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if(!$focus->ACLAccess('Delete')) {
|
||||
|
||||
ACLController::displayNoAccess(true);
|
||||
|
||||
sugar_cleanup(true);
|
||||
|
||||
}
|
||||
|
||||
$focus->deleteAssignedPositions();
|
||||
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
|
||||
|
||||
// NOW THAT THE DELETE HAS BEEN PERFORMED, RETURN TO GIVEN LOCATION
|
||||
|
||||
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
201
modules/EcmInsideOrders.cp/DetailView.php
Executable file
201
modules/EcmInsideOrders.cp/DetailView.php
Executable file
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
// require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
|
||||
require_once('modules/EcmInsideOrders/Forms.php');
|
||||
|
||||
require_once ('include/time.php');
|
||||
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
|
||||
$OPT = array();
|
||||
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4;
|
||||
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
$focus->format_all_fields();
|
||||
|
||||
if(isset($_REQUEST['status']) && $_REQUEST['status'] != '' ) {
|
||||
$focus->doNotAccepted();
|
||||
}
|
||||
|
||||
$focus->position_list = str_replace('"','\"',$focus->getPositionList());
|
||||
|
||||
$OPT['status'] = $focus->status;
|
||||
|
||||
} else {
|
||||
|
||||
$OPT['new_number'] = true;
|
||||
|
||||
$datef = $current_user->getPreference('datef');
|
||||
|
||||
if($datef != '') $sugar_config['datef'];
|
||||
|
||||
$focus->register_date = date($datef);
|
||||
|
||||
$focus->payment_date = date($datef,mktime()+30*24*60*60);
|
||||
|
||||
$focus->sell_date = date($datef);
|
||||
|
||||
}
|
||||
|
||||
//if access 'Delete' is avaible for user than he is Manager and he can confirm Quotes.
|
||||
$OPT['user']['access']['send_email'] = $focus->ACLAccess("send_email");
|
||||
if(isset($_REQUEST['send_email']) && $_REQUEST['send_email'] == '1') $OPT['setTab'] = 'EMAIL';
|
||||
|
||||
|
||||
|
||||
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_decimal_seperator'];
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_currency_significant_digits'];
|
||||
$OPT['dec_len'] = $tmp;
|
||||
|
||||
|
||||
$OPT['default_unit'] = "1";
|
||||
|
||||
$OPT['default_vat'] = "19.00";
|
||||
|
||||
$OPT['default_category'] = "";
|
||||
|
||||
$OPT['type'] = $focus->type;
|
||||
|
||||
$OPT['to_is_vat_free'] = $focus->to_is_vat_free;
|
||||
|
||||
$cq = $current_user->getPreference('confirm_quotes');
|
||||
$OPT['user']['confirm_quotes'] = ((isset($cq) && $cq)?1:0);
|
||||
|
||||
$w=$GLOBALS['db']->query("select name,id,value from ecmvats where deleted='0' order by name");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$VAT[$r['id']]=array(
|
||||
"id"=>$r['id'],
|
||||
"name"=>$r['name'],
|
||||
"value"=>$r['value']
|
||||
);
|
||||
$nvats++;
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
|
||||
$show_pdf=$current_user->getPreference('show_pdf_in_div');
|
||||
if(!isset($show_pdf)){
|
||||
require_once('modules/EcmGroupSales/EcmGroupSale.php');
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
$show_pdf=$cc['show_pdf_in_div_global'];
|
||||
}
|
||||
$scriptOpt = '<script language="javascript">
|
||||
|
||||
var SHOW_PDF_IN_DIV ='.$show_pdf.';
|
||||
|
||||
var NOOFVATS ='.$nvats.';
|
||||
|
||||
var VAT = '.str_replace('"','\"',$json->encode($VAT)).';
|
||||
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
|
||||
var N;
|
||||
|
||||
</script>';
|
||||
|
||||
echo $scriptOpt;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
require_once('modules/EcmInsideOrders/views/DetailView/view.detail.my.php');
|
||||
|
||||
$edit = new ViewDetailMy();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
//echo $focus->subtotal;
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl';
|
||||
|
||||
$edit->bean->total = unformat_number($edit->bean->total);
|
||||
$edit->module = "EcmInsideOrders";
|
||||
|
||||
$edit->preDisplay();
|
||||
|
||||
//$edit->bean->subtotal = unformat_number($edit->bean->subtotal);
|
||||
|
||||
//echo '<br>'.$edit->bean->subtotal;
|
||||
|
||||
|
||||
$rdoc=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecminsideorders where id='".$_REQUEST['record']."'"));
|
||||
$srw=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select name from ecmstocks where id='".$rdoc['rw_stock_id']."'"));
|
||||
$spw=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select name from ecmstocks where id='".$rdoc['pw_stock_id']."'"));
|
||||
$edit->ss->assign("RW_STOCK", $srw['name']);
|
||||
$edit->ss->assign("PW_STOCK", $spw['name']);
|
||||
|
||||
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select o.pw_id from ecminsideorders as o where o.id='".$focus->id."'"));
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select count(*) as c from ecmstockdocinsideins where id='".$r['pw_id']."'"));
|
||||
|
||||
$edit->ss->assign("CID",$r['c']);
|
||||
|
||||
|
||||
$arr_template = $focus->getTemplateList();
|
||||
$desc.='<input title="Generuj PDF" class="button" onclick="if(document.getElementById(\'div_desc\').style.display==\'none\')document.getElementById(\'div_desc\').style.display=\'block\';else document.getElementById(\'div_desc\').style.display=\'none\';" type="button" name="productcard" id="productcard" value="Generuj PDF">';
|
||||
$desc .= '<div id="div_desc" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
$desc .= 'Typ: <select name="preview_type" id="preview_type"><option value>Zamówienie wewnętrzne</option><br /><br />';
|
||||
$desc.='<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.location = \'index.php?module=EcmInsideOrders&action=previewPDF&to_pdf=1&record='.$_REQUEST['record'].'\';" type="button" value="Pokaż PDF">';
|
||||
$edit->ss->assign("CATALOGUE",$desc);
|
||||
|
||||
if(isset($focus->template_id)) $edit->ss->assign("DOCUMENT_TEMPLATES_OPTIONS", get_select_options_with_id($arr_template, $focus->template_id));
|
||||
|
||||
else $edit->ss->assign("DOCUMENT_TEMPLATES_OPTIONS", get_select_options_with_id($arr_template, ''));
|
||||
|
||||
$edit->ss->assign("POSITION_LIST", $focus->position_list);
|
||||
$edit->ss->assign("EMPLOYERS",str_replace("|",", ",$rdoc['employers']));
|
||||
|
||||
$edit->ss->assign("OPT", $OPT);
|
||||
// $email_link_tab = '<script language="javascript">YAHOO.util.Event.addListener(window,"load",function(){setEMAIL = function(){'.$focus->createSendEmailLink().'}});</script>';
|
||||
// $edit->ss->assign("EMAIL_LINK_TAB",$email_link_tab);
|
||||
|
||||
echo $edit->display();
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, "EcmInsideOrders");
|
||||
echo $subpanel->display();
|
||||
?>
|
||||
5
modules/EcmInsideOrders.cp/DetailView2.php
Executable file
5
modules/EcmInsideOrders.cp/DetailView2.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
include('modules/EcmInsideOrders/EditView.php');
|
||||
|
||||
?>
|
||||
1583
modules/EcmInsideOrders.cp/EcmInsideOrder.php
Executable file
1583
modules/EcmInsideOrders.cp/EcmInsideOrder.php
Executable file
File diff suppressed because it is too large
Load Diff
80
modules/EcmInsideOrders.cp/EcmProductsEcmInsideOrdersRelation.php
Executable file
80
modules/EcmInsideOrders.cp/EcmProductsEcmInsideOrdersRelation.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?
|
||||
global $db;
|
||||
class EcmProductsEcmInsideOrdersRelation{
|
||||
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $created_by;
|
||||
var $ecminsideorder_id;
|
||||
var $ecmproduct_id;
|
||||
var $product_code;
|
||||
var $product_name;
|
||||
var $product_quantity;
|
||||
var $product_prod_quantity;
|
||||
var $product_price;
|
||||
var $product_total;
|
||||
var $product_component;
|
||||
var $product_component_quantity;
|
||||
var $product_product_id;
|
||||
var $product_guid;
|
||||
var $product_position;
|
||||
var $unformated_numbers;
|
||||
|
||||
function EcmProductsEcmInsideOrders(){
|
||||
}
|
||||
function retrieve($id){
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecmproducts_ecminsideorders where id='".$id."'"));
|
||||
$this->id=$r['id'];
|
||||
$this->date_entered=$r['date_entered'];
|
||||
$this->date_modified=$r['date_modified'];
|
||||
$this->modified_user_id=$r['modified_user_id'];
|
||||
$this->assigned_user_id=$r['assigned_user_id'];
|
||||
$this->created_by=$r['created_by'];
|
||||
$this->ecminsideorder_id=$r['ecminsideorder_id'];
|
||||
$this->ecmproduct_id=$r['ecmproduct_id'];
|
||||
$this->product_code=$r['product_code'];
|
||||
$this->product_name=$r['product_name'];
|
||||
$this->product_quantity=$r['product_quantity'];
|
||||
$this->product_prod_quantity=$r['product_prod_quantity'];
|
||||
$this->product_price=$r['product_price'];
|
||||
$this->product_total=$r['product_total'];
|
||||
$this->product_component=$r['product_component'];
|
||||
$this->product_component_quantity=$r['product_component_quantity'];
|
||||
$this->product_product_id=$r['product_product_id'];
|
||||
$this->product_guid=$r['product_guid'];
|
||||
$this->product_position=$r['product_position'];
|
||||
}
|
||||
function save(){
|
||||
global $db;
|
||||
$pq=floatval($this->product_quantity);
|
||||
$ppq=floatval($this->product_prod_quantity);
|
||||
$pp=floatval($this->product_price);
|
||||
$pt=floatval($this->product_total);
|
||||
|
||||
$query="insert into ecmproducts_ecminsideorders set
|
||||
id='".create_guid()."',
|
||||
date_entered='".$this->date_entered."',
|
||||
date_modified='".$this->date_modified."',
|
||||
modified_user_id='".$this->modified_user_id."',
|
||||
assigned_user_id='".$this->assigned_user_id."',
|
||||
created_by='".$this->created_by."',
|
||||
deleted='0',
|
||||
ecminsideorder_id='".$this->ecminsideorder_id."',
|
||||
ecmproduct_id='".$this->ecmproduct_id."',
|
||||
product_code='".$this->product_code."',
|
||||
product_name='".$this->product_name."',
|
||||
product_quantity='".$pq."',
|
||||
product_prod_quantity='".$ppq."',
|
||||
product_price='".$pp."',
|
||||
product_total='".$pt."',
|
||||
product_component='".$this->product_component."',
|
||||
product_component_quantity='".$this->product_component_quantity."',
|
||||
product_product_id='".$this->product_product_id."',
|
||||
product_guid='".$this->product_guid."',
|
||||
product_position='".$this->product_position."'";
|
||||
$GLOBALS['db']->query($query);
|
||||
}
|
||||
}
|
||||
?>
|
||||
359
modules/EcmInsideOrders.cp/EditView.php
Executable file
359
modules/EcmInsideOrders.cp/EditView.php
Executable file
@@ -0,0 +1,359 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
//require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
require_once('modules/EcmInsideOrders/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
require_once('include/Upload.php');
|
||||
|
||||
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
|
||||
$OPT = array();
|
||||
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4;
|
||||
$OPT['quick_product_item_adding'] = $cc['quick_product_item_adding'];
|
||||
|
||||
if($cc['checkbox_demo'] == 1) {
|
||||
$query = "SELECT COUNT(id) as count FROM ecminsideorders WHERE deleted='0'";
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$row = $GLOBALS['db']->fetchByAssoc($result);
|
||||
if(isset($row['count']) && is_numeric($row['count']=intval($row['count'])) && $row['count'] >= 10) $OPT['checkbox_demo'] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//$OPT['default_manager_role_id'] = $cc['default_manager_role_id'];
|
||||
//$OPT['default_representative_role_id'] = $cc['default_representative_role_id'];
|
||||
//$OPT['default_representative_extra_role_id'] = $cc['default_representative_extra_role_id'];
|
||||
|
||||
$OPT['check_parent_id'] = true;
|
||||
|
||||
$cq = $current_user->getPreference('confirm_quotes');
|
||||
$OPT['user']['confirm_quotes'] = ((isset($cq) && $cq)?1:0);
|
||||
|
||||
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
$OPT['auto_commiting'] = $focus->ACLAccess('auto_commiting');
|
||||
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
|
||||
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if(isset($focus->id) && $focus->id != '') {
|
||||
if($focus->accepted == 1) {
|
||||
echo 'You cannot edit this quote. This quote is accepted. <a href="index.php?module='.$_REQUEST['return_module'].'&action='.$_REQUEST['return_action'].'&record='.$_REQUEST['return_id'].'">return</a>';
|
||||
return;
|
||||
}
|
||||
$focus->format_all_fields();
|
||||
$focus->position_list = str_replace('"','\"',$focus->getPositionList());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if(isset($_REQUEST['contact_id']) && $_REQUEST['contact_id'] != '' && isset($_REQUEST['contact_name']) && $_REQUEST['contact_name'] != '') {
|
||||
$_REQUEST['parent_type'] = 'Contacts';
|
||||
$_REQUEST['parent_name'] = $_REQUEST['contact_name'];
|
||||
$_REQUEST['parent_id'] = $_REQUEST['contact_id'];
|
||||
$OPT['check_parent_id'] = false;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['account_id']) && $_REQUEST['account_id'] != '' && isset($_REQUEST['account_name']) && $_REQUEST['account_name'] != '') {
|
||||
$_REQUEST['parent_type'] = 'Accounts';
|
||||
$_REQUEST['parent_name'] = $_REQUEST['account_name'];
|
||||
$_REQUEST['parent_id'] = $_REQUEST['account_id'];
|
||||
$OPT['check_parent_id'] = false;
|
||||
}
|
||||
|
||||
$OPT['new_number'] = true;
|
||||
//$focus->status = "s10";
|
||||
|
||||
if(isset($cc)) {
|
||||
//payment condition
|
||||
$cc_list = EcmGroupSale::getPositionList('ecmpaymentconditions');
|
||||
$focus->ecmpaymentcondition_id = $cc['default_payment_condition'];
|
||||
$focus->ecmpaymentcondition_name = $cc_list[$cc['default_payment_condition']];
|
||||
|
||||
//delivery condition
|
||||
$cc_list = EcmGroupSale::getPositionList('ecmdeliveryconditions');
|
||||
$focus->ecmdeliverycondition_id = $cc['default_delivery_condition'];
|
||||
$focus->ecmdeliverycondition_name = $cc_list[$cc['default_delivery_condition']];
|
||||
|
||||
//default template
|
||||
$focus->template_id = $cc['default_document_template'];
|
||||
$fftemplateid = $focus->template_id;
|
||||
}
|
||||
}
|
||||
|
||||
//if access 'Delete' is avaible for user than he is Manager and he can confirm Quotes.
|
||||
$OPT['user']['access']['send_email'] = $focus->ACLAccess("send_email");
|
||||
|
||||
|
||||
//$OPT['old_status'] = (isset($focus->status) && $focus->status != '')?$focus->status:'registered';
|
||||
|
||||
if($_REQUEST['isDuplicate'] == 'true') { $_POST['isDuplicate'] = true; $focus->id = ''; $OPT['isDuplicate'] = ture; $OPT['new_number'] = true; }
|
||||
|
||||
if(!isset($focus->discount) || $focus->discount == '') $focus->discount = '0.00';
|
||||
|
||||
if($OPT['new_number'] == true) {
|
||||
|
||||
$datef = $current_user->getPreference('datef');
|
||||
|
||||
if($datef != '') $sugar_config['datef'];
|
||||
|
||||
$focus->register_date = date($datef);
|
||||
|
||||
$focus->payment_date = date($datef,mktime()+30*24*60*60);
|
||||
|
||||
$focus->sell_date = date($datef);
|
||||
|
||||
}
|
||||
include_once("modules/EcmSales/productionHelper.php");
|
||||
|
||||
if($_GET['production']==1){
|
||||
|
||||
if(count($_REQUEST['check'])>0){
|
||||
foreach($_REQUEST['check'] as $ch){
|
||||
|
||||
$return_array=array();
|
||||
$rp=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecmproducts where id='".$ch."'"));
|
||||
$sales=getSalesLast3m($rp['id']);
|
||||
$guid=create_guid();
|
||||
$return_array['id'] = $rp['id'];
|
||||
$return_array['code'] = $rp['code'];
|
||||
$return_array['name'] = $rp['name'];
|
||||
$return_array['quantity'] = floor($sales/2);
|
||||
$return_array['prod_quantity'] = "";
|
||||
$return_array['price'] = $rp['ems_price'];
|
||||
$return_array['total'] = $rp['moq']*$rp['ems_price'];
|
||||
$return_array['component'] = "";
|
||||
$return_array['component_quantity'] = "";
|
||||
$return_array['product_id'] = "";
|
||||
$return_array['guid'] = $guid;
|
||||
$rrr[]=$return_array;
|
||||
$wc=$GLOBALS['db']->query("select ecmproduct_id as product_id,ecmcomponent_id as id,name,code,quantity from ecmproductcomponents where ecmproduct_id='".$rp['id']."' and deleted='0'");
|
||||
while($rc=$GLOBALS['db']->fetchByAssoc($wc)){
|
||||
$return_array=array();
|
||||
$return_array['id'] = $rc['product_id'];
|
||||
$return_array['code'] = $rc['code'];
|
||||
$return_array['name'] = $rc['name'];
|
||||
$return_array['quantity'] = $rp['moq']*$rc['quantity'];
|
||||
$return_array['prod_quantity'] = "";
|
||||
$return_array['price'] = 0;
|
||||
$return_array['total'] = 0;
|
||||
$return_array['component'] = 1;
|
||||
$return_array['component_quantity'] = $rc['quantity'];
|
||||
$return_array['product_id'] = $rp['id'];
|
||||
$return_array['guid'] = $guid;
|
||||
$rrr[]=$return_array;
|
||||
}
|
||||
}
|
||||
$json = getJSONobj();
|
||||
$focus->position_list = str_replace('"','\"',$json->encode($rrr));
|
||||
}
|
||||
}
|
||||
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_decimal_seperator'];
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_currency_significant_digits'];
|
||||
$OPT['dec_len'] = $tmp;
|
||||
|
||||
|
||||
|
||||
$OPT['default_unit'] = "1";
|
||||
|
||||
$OPT['default_vat'] = "19.00";
|
||||
|
||||
$OPT['default_category'] = "";
|
||||
|
||||
$OPT['default_currency'] = "-99";
|
||||
|
||||
$OPT['type'] = $focus->type;
|
||||
|
||||
$OPT['to_is_vat_free'] = $focus->to_is_vat_free;
|
||||
|
||||
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
$data = EcmText::LoadText(null,null,"EcmInsideOrders",$key);
|
||||
if(isset($data[0]) && isset($data[0]['data'])) $d = $data[0]['data']; else {
|
||||
$d = $PDFLL;
|
||||
if(!isset($d['labels'])) $d['labels'] = $PDFLL['labels'];
|
||||
if(!isset($d['texts']['Contacts']['header_text'])) $d['texts']['Contacts']['header_text'] = $mod_strings['LBL_DEFAULT_CONTACT_HEADER_TEXT'];
|
||||
if(!isset($d['texts']['Contacts']['footer_text'])) $d['texts']['Contacts']['footer_text'] = $mod_strings['LBL_DEFAULT_CONTACT_FOOTER_TEXT'];
|
||||
if(!isset($d['texts']['Contacts']['ads_text'])) $d['texts']['Contacts']['ads_text'] = $mod_strings['LBL_DEFAULT_CONTACT_ADS_TEXT'];
|
||||
if(!isset($d['texts']['Accounts']['header_text'])) $d['texts']['Accounts']['header_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_HEADER_TEXT'];
|
||||
if(!isset($d['texts']['Accounts']['footer_text'])) $d['texts']['Accounts']['footer_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_FOOTER_TEXT'];
|
||||
if(!isset($d['texts']['Accounts']['ads_text'])) $d['texts']['Accounts']['ads_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_ADS_TEXT'];
|
||||
}
|
||||
$OPT['ecmlanguage'][$key]['texts'] = $d['texts'];
|
||||
}
|
||||
$w=$GLOBALS['db']->query("select name,id,value from ecmvats where deleted='0' order by name");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$VAT[$r['id']]=array(
|
||||
"id"=>$r['id'],
|
||||
"name"=>$r['name'],
|
||||
"value"=>$r['value']
|
||||
);
|
||||
$nvats++;
|
||||
}
|
||||
|
||||
|
||||
$show_pdf=$current_user->getPreference('show_pdf_in_div');
|
||||
if(!isset($show_pdf)){
|
||||
require_once('modules/EcmGroupSales/EcmGroupSale.php');
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
$show_pdf=$cc['show_pdf_in_div_global'];
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$scriptOpt = '<script language="javascript">
|
||||
var SHOW_PDF_IN_DIV ='.$show_pdf.';
|
||||
var NOOFVATS ='.$nvats.';
|
||||
var VAT = '.str_replace('"','\"',$json->encode($VAT)).';
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
var N;
|
||||
</script>';
|
||||
$larr=array("en_us","pl_pl","ge_ge");
|
||||
foreach($larr as $la){
|
||||
$lv=return_app_list_strings_language($la);
|
||||
$UNIT_LANG[$la]=$lv['ecmproducts_unit_dom'];
|
||||
}
|
||||
$scriptOpt.='<script language="javascript">
|
||||
var UNIT_LANG='.str_replace('"','\"',$json->encode($UNIT_LANG)).';
|
||||
</script>';
|
||||
|
||||
echo $scriptOpt;
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmInsideOrders/views/EditView/view.edit.ecminsideorders.php');
|
||||
|
||||
$edit = new ViewEditEcmInsideOrders();
|
||||
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->bean = $focus;
|
||||
|
||||
$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
|
||||
$edit->module = 'EcmInsideOrders';
|
||||
$edit->ss->assign("OPT",$OPT);
|
||||
|
||||
$edit->preDisplay();
|
||||
|
||||
|
||||
|
||||
//load currencies
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
$currency = new Currency();
|
||||
$currency_list = $currency->get_full_list('name');
|
||||
$currency->retrieve('-99');
|
||||
if(is_array($currency_list))
|
||||
{
|
||||
$currency_list = array_merge(Array($currency), $currency_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
$currency_list = Array($currency);
|
||||
}
|
||||
$arr = array();
|
||||
foreach($currency_list as $key=>$value)
|
||||
{
|
||||
$arr[$value->id] = $value->name;
|
||||
}
|
||||
|
||||
$edit->ss->assign("EXCHANGE_RATE",get_select_options_with_id($arr, $focus->exchange_rate_id));
|
||||
|
||||
|
||||
|
||||
if(isset($fftemplateid) && $fftemplateid != '') $focus->template_id = $fftemplateid;
|
||||
|
||||
$arr_template = $focus->getTemplateList();
|
||||
|
||||
$tt="";
|
||||
$w=$GLOBALS['db']->query("select name,id,deleted,date_modified from ecmdocumenttemplates where deleted='0' or id='".$focus->template_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
if($r['deleted']==1 && $_REQUEST['record']){
|
||||
$tt.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$focus->template_id)$tt.=' selected';
|
||||
$tt.='>'.$r['name'].' till '.$r['date_modified'].'</option>';
|
||||
}
|
||||
elseif($r['deleted']==0){
|
||||
$tt.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$focus->template_id)$tt.=' selected';
|
||||
$tt.='>'.$r['name'].'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$edit->ss->assign("DOCUMENT_TEMPLATES_OPTIONS", $tt);
|
||||
|
||||
$rdoc=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecminsideorders where id='".$_REQUEST['record']."'"));
|
||||
|
||||
$w=$GLOBALS['db']->query("select name,id from ecmstocks where deleted='0' order by name asc");
|
||||
$rw='<option value=""></option>';
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$rw.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$rdoc['rw_stock_id'])$rw.=' selected';
|
||||
$rw.='>'.$r['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("RW_STOCK", $rw);
|
||||
$w=$GLOBALS['db']->query("select name,id from ecmstocks where deleted='0' order by name asc");
|
||||
$pw='<option value=""></option>';
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$pw.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$rdoc['pw_stock_id'])$pw.=' selected';
|
||||
$pw.='>'.$r['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("PW_STOCK", $pw);
|
||||
|
||||
$earr=array(
|
||||
|
||||
'Darek' => 'Darek',
|
||||
'Helena' => 'Helena',
|
||||
'Emila' => 'Emila',
|
||||
'Bogusia Serymoch' => 'Bogusia Serymoch',
|
||||
'Marcin Popławski' => 'Marcin Popławski',
|
||||
);
|
||||
foreach($earr as $ea){
|
||||
$eas.='<option value="'.$ea.'"';
|
||||
if(in_array($ea,explode("|",$rdoc['employers'])))$eas.=' selected';
|
||||
$eas.='>'.$ea.'</option>';
|
||||
}
|
||||
$edit->ss->assign("EMPLOYERS", $eas);
|
||||
|
||||
$edit->ss->assign("POSITION_LIST",$focus->position_list);
|
||||
|
||||
$edit->ss->assign("MFP",$focus->loadParserArray());
|
||||
|
||||
echo $edit->display();
|
||||
?>
|
||||
378
modules/EcmInsideOrders.cp/EmailSave.php
Executable file
378
modules/EcmInsideOrders.cp/EmailSave.php
Executable file
@@ -0,0 +1,378 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
|
||||
* Reserved. Contributor(s): ______________________________________..
|
||||
*********************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
if(isset($_REQUEST['type']) && $_REQUEST['type'] == "save_template_changes") {
|
||||
require_once('modules/EmailTemplates/EmailTemplate.php');
|
||||
$et = new EmailTemplate();
|
||||
$et->retrieve($_REQUEST['email_template']);
|
||||
if(isset($et->id) && $et->id != '') {
|
||||
$et->name = $_REQUEST['new_template_name'];
|
||||
$et->body = $_REQUEST['description'];
|
||||
$et->body_html = $_REQUEST['descriptin_html'];
|
||||
$et->save();
|
||||
}
|
||||
header("Location: index.php?action=Emails&module=EcmInsideOrders&to_pdf=1&type=out&record=$return_id"e_id=".$_REQUEST['quote_id']."&sended=1&pTypeFrom=Users&pIdFrom=".$_REQUEST['pIdFrom']."&pTypeTo=".$_REQUEST['pTypeTo']."&pIdTo=".$_REQUEST['pIdTo']);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['type']) && $_REQUEST['type'] == "save_template_as_new") {
|
||||
echo "save_template_as_new";
|
||||
die();
|
||||
}
|
||||
|
||||
*/
|
||||
//var_dump($_POST); die();
|
||||
require_once('modules/Emails/Email.php');
|
||||
|
||||
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// EMAIL SEND/SAVE SETUP
|
||||
$focus = new Email();
|
||||
|
||||
if(!isset($prefix)) {
|
||||
$prefix = '';
|
||||
}
|
||||
if(isset($_POST[$prefix.'meridiem']) && !empty($_POST[$prefix.'meridiem'])) {
|
||||
$_POST[$prefix.'time_start'] = $timedate->merge_time_meridiem($_POST[$prefix.'time_start'], $timedate->get_time_format(true), $_POST[$prefix.'meridiem']);
|
||||
}
|
||||
//retrieve the record
|
||||
if(isset($_POST['record']) && !empty($_POST['record'])) {
|
||||
$focus->retrieve($_POST['record']);
|
||||
|
||||
}
|
||||
if(isset($_REQUEST['user_id'])) {
|
||||
$focus->assigned_user_id = $_REQUEST['user_id'];
|
||||
}
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
if(!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
$check_notify = TRUE;
|
||||
}
|
||||
//populate the fields of this Email
|
||||
$allfields = array_merge($focus->column_fields, $focus->additional_column_fields);
|
||||
foreach($allfields as $field) {
|
||||
if(isset($_POST[$field])) {
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs'])) {
|
||||
$_REQUEST['to_addrs'] = "";
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs_ids'])) {
|
||||
$_REQUEST['to_addrs_ids'] = "";
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs_names'])) {
|
||||
$_REQUEST['to_addrs_names'] = "";
|
||||
}
|
||||
if (!isset($_REQUEST['to_addrs_emails'])) {
|
||||
$_REQUEST['to_addrs_emails'] = "";
|
||||
}
|
||||
|
||||
//compare the 3 fields and return list of contact_ids to link:
|
||||
$focus->to_addrs_arr = $focus->parse_addrs($_REQUEST['to_addrs'], $_REQUEST['to_addrs_ids'], $_REQUEST['to_addrs_names'], $_REQUEST['to_addrs_emails']);
|
||||
|
||||
// make sure the cc_* and bcc_* fields are at least empty if not set
|
||||
$fields_to_check = array(
|
||||
'cc_addrs',
|
||||
'cc_addrs_ids',
|
||||
'bcc_addrs',
|
||||
'bcc_addrs_ids',
|
||||
'cc_addrs_names',
|
||||
'cc_addrs_emails',
|
||||
'bcc_addrs_emails',
|
||||
);
|
||||
foreach ($fields_to_check as $field_to_check) {
|
||||
if (!isset($_REQUEST[$field_to_check])) {
|
||||
$_REQUEST[$field_to_check] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$focus->cc_addrs_arr = $focus->parse_addrs($_REQUEST['cc_addrs'], $_REQUEST['cc_addrs_ids'], $_REQUEST['cc_addrs_names'], $_REQUEST['cc_addrs_emails']);
|
||||
$focus->bcc_addrs_arr = $focus->parse_addrs($_REQUEST['bcc_addrs'], $_REQUEST['bcc_addrs_ids'], $_REQUEST['to_addrs_names'], $_REQUEST['bcc_addrs_emails']);
|
||||
|
||||
|
||||
if(!empty($_REQUEST['type'])) {
|
||||
$focus->type = $_REQUEST['type'];
|
||||
} elseif(empty($focus->type)) { // cn: from drafts/quotes
|
||||
$focus->type = 'archived';
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREP FOR ATTACHMENTS
|
||||
if(empty($focus->id)){
|
||||
$focus->id = create_guid();
|
||||
$focus->new_with_id = true;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// ATTACHMENT HANDLING
|
||||
|
||||
$focus->handleAttachments();
|
||||
|
||||
|
||||
if(isset($_REQUEST['quote_id']) && $_REQUEST['quote_id'] != '') {
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
$off = new EcmInsideOrder();
|
||||
$off->retrieve($_REQUEST['quote_id']);
|
||||
$off->formatNumber();
|
||||
|
||||
if(isset($off->id) && $off->id != '') {
|
||||
require_once('modules/Notes/Note.php');
|
||||
$n = new Note();
|
||||
$n->name = $mod_strings['LBL_EMAIL_ATTACHMENT'].': '.$off->createPdfFileName(false);
|
||||
$n->filename = $off->createPdfFileName();
|
||||
$n->file_mime_type = 'application/pdf';
|
||||
$n->parent_id = $focus->id;
|
||||
$n->parent_type = $focus->module_dir;
|
||||
$n->parent_name = $focus->name;
|
||||
$nid = $n->save();
|
||||
//var_dump($sugar_config['upload_dir'].'oferta.pdf'); die();
|
||||
//echo $off->name; die();
|
||||
//global $sugar_config;
|
||||
if($nid) $off->getPDF(null,'F',$sugar_config['upload_dir'].$nid);
|
||||
$focus->saved_attachments[] = $n;
|
||||
}
|
||||
|
||||
$off->setTemplate();
|
||||
$off->loadParser();
|
||||
$focus->name = $off->template->mfp->parseText($focus->name);
|
||||
$focus->description = $off->template->mfp->parseText($focus->description);
|
||||
$focus->description_html = $off->template->mfp->parseText($focus->description_html);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// TEMPLATE PARSING
|
||||
// cn: bug 7244 - need to pass an empty bean to parse email templates
|
||||
$object_arr = array();
|
||||
if(!empty($focus->parent_id)) {
|
||||
$object_arr[$focus->parent_type] = $focus->parent_id;
|
||||
}
|
||||
if(isset($focus->to_addrs_arr[0]['contact_id'])) {
|
||||
$object_arr['Contacts'] = $focus->to_addrs_arr[0]['contact_id'];
|
||||
}
|
||||
if(empty($object_arr)) {
|
||||
$object_arr = array('Contacts' => '123');
|
||||
}
|
||||
|
||||
// do not parse email templates if the email is being saved as draft....
|
||||
if($focus->type != 'draft' && count($object_arr) > 0) {
|
||||
require_once($beanFiles['EmailTemplate']);
|
||||
$focus->name = EmailTemplate::parse_template($focus->name, $object_arr);
|
||||
$focus->description = EmailTemplate::parse_template($focus->description, $object_arr);
|
||||
$focus->description_html = EmailTemplate::parse_template($focus->description_html, $object_arr);
|
||||
// if($focus->description == '') $focus->description = strip_tags(str_replace("<br>","\n",$focus->description_html));
|
||||
// if($focus->description_html == '') $focus->description_html = str_replace("\n","<br>",$focus->description);
|
||||
}
|
||||
//// END TEMPLATE PARSING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
/*
|
||||
var_dump($focus->parent_id);
|
||||
var_dump($focus->saved_attachments[0]->name);
|
||||
var_dump($focus->saved_attachments[0]->parent_name);
|
||||
*/
|
||||
//var_dump($focus->saved_attachments[0]->file);
|
||||
//die();
|
||||
|
||||
//// END ATTACHMENT HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
$focus->status = 'draft';
|
||||
if($focus->type == 'archived' ) {
|
||||
$focus->status= 'archived';
|
||||
} elseif(($focus->type == 'out' || $focus->type == 'forward') && isset($_REQUEST['send']) && $_REQUEST['send'] == '1') {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// REPLY PROCESSING
|
||||
$old = array('<','>');
|
||||
$new = array('<','>');
|
||||
|
||||
if($_REQUEST['from_addr'] != $_REQUEST['from_addr_name'].' <'.$_REQUEST['from_addr_email'].'>') {
|
||||
if(false === strpos($_REQUEST['from_addr'], '<')) { // we have an email only?
|
||||
$focus->from_addr = $_REQUEST['from_addr'];
|
||||
$focus->from_name = '';
|
||||
} else { // we have a compound string
|
||||
$newFromAddr = str_replace($old, $new, $_REQUEST['from_addr']);
|
||||
$focus->from_addr = substr($newFromAddr, (1 + strpos($newFromAddr, '<')), (strpos($newFromAddr, '>') - strpos($newFromAddr, '<')) -1 );
|
||||
$focus->from_name = substr($newFromAddr, 0, (strpos($newFromAddr, '<') -1));
|
||||
}
|
||||
} elseif(!empty($_REQUEST['from_addr_email']) && isset($_REQUEST['from_addr_email'])) {
|
||||
$focus->from_addr = $_REQUEST['from_addr_email'];
|
||||
$focus->from_name = $_REQUEST['from_addr_name'];
|
||||
} else {
|
||||
$focus->from_addr = $focus->getSystemDefaultEmail();
|
||||
}
|
||||
//// REPLY PROCESSING
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
if($focus->send()) {
|
||||
$focus->status = 'sent';
|
||||
} else {
|
||||
$focus->status = 'send_error';
|
||||
}
|
||||
}
|
||||
|
||||
$focus->to_addrs = $_REQUEST['to_addrs'];
|
||||
|
||||
// delete the existing relationship of all the email addresses with this email
|
||||
$query = "update emails_email_addr_rel set deleted = 1 WHERE email_id = '{$focus->id}'";
|
||||
$focus->db->query($query);
|
||||
|
||||
// delete al the relationship of this email with all the beans
|
||||
$query = "update emails_beans set deleted = 1, bean_id = '', bean_module = '' WHERE email_id = '{$focus->id}'";
|
||||
$focus->db->query($query);
|
||||
|
||||
|
||||
if(isset($_REQUEST['object_type']) && !empty($_REQUEST['object_type']) && isset($_REQUEST['object_id']) && !empty($_REQUEST['object_id'])) {
|
||||
//run linking code only if the object_id has not been linked as part of the contacts above
|
||||
$GLOBALS['log']->debug("CESELY".$_REQUEST['object_type']);
|
||||
if(!in_array($_REQUEST['object_id'],$exContactIds)){
|
||||
$rel = strtolower($_REQUEST['object_type']);
|
||||
$focus->load_relationship($rel);
|
||||
$focus->$rel->add($_REQUEST['object_id']);
|
||||
$GLOBALS['log']->debug("CESELY LOADED".$_REQUEST['object_type']);
|
||||
}
|
||||
}
|
||||
//// handle legacy parent_id/parent_type relationship calls
|
||||
elseif(isset($_REQUEST['parent_type']) && !empty($_REQUEST['parent_type']) && isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id'])) {
|
||||
//run linking code only if the object_id has not been linked as part of the contacts above
|
||||
if(!isset($exContactIds) || !in_array($_REQUEST['parent_id'],$exContactIds)){
|
||||
$rel = strtolower($_REQUEST['parent_type']);
|
||||
$focus->load_relationship($rel);
|
||||
$focus->$rel->add($_REQUEST['parent_id']);
|
||||
}
|
||||
}
|
||||
//// END RELATIONSHIP LINKING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// If came from email archiving edit view, this would have been set from form input.
|
||||
if (!isset($focus->date_start))
|
||||
{
|
||||
$today = gmdate('Y-m-d H:i:s');
|
||||
$focus->date_start = $timedate->to_display_date($today);
|
||||
$focus->time_start = $timedate->to_display_time($today, true);
|
||||
}
|
||||
|
||||
$focus->date_sent = "";
|
||||
$focus->save(false);
|
||||
|
||||
//zmiana statusu na Sent
|
||||
if(isset($_REQUEST['quote_id']) && $_REQUEST['quote_id'] != '') {
|
||||
$query = "UPDATE ecminsideorders SET status='s50' WHERE id='".$_REQUEST['quote_id']."'";
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
}
|
||||
|
||||
//// END EMAIL SAVE/SEND SETUP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// RELATIONSHIP LINKING
|
||||
$focus->load_relationship('users');
|
||||
$focus->users->add($current_user->id);
|
||||
|
||||
if(!empty($_REQUEST['to_addrs_ids'])) {
|
||||
$focus->load_relationship('contacts');
|
||||
$exContactIds = explode(';', $_REQUEST['to_addrs_ids']);
|
||||
foreach($exContactIds as $contactId) {
|
||||
$contactId = trim($contactId);
|
||||
$focus->contacts->add($contactId);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PAGE REDIRECTION
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
$return_id = $focus->id;
|
||||
|
||||
if(empty($_POST['return_module'])) {
|
||||
$return_module = "Emails";
|
||||
} else {
|
||||
$return_module = $_POST['return_module'];
|
||||
}
|
||||
if(empty($_POST['return_action'])) {
|
||||
$return_action = "DetailView";
|
||||
} else {
|
||||
$return_action = $_POST['return_action'];
|
||||
}
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
require_once('include/formbase.php');
|
||||
if($focus->type == 'draft') {
|
||||
if($return_module == 'Emails') {
|
||||
header("Location: index.php?module=$return_module&action=ListViewDrafts");
|
||||
} else {
|
||||
handleRedirect($return_id, 'Emails');
|
||||
}
|
||||
} elseif($focus->type == 'out') {
|
||||
if($return_module == 'Home') {
|
||||
header('Location: index.php?module='.$return_module.'&action=index');
|
||||
}
|
||||
if(!empty($_REQUEST['return_id'])) {
|
||||
$return_id = $_REQUEST['return_id'];
|
||||
}
|
||||
header('Location: index.php?action='.$return_action.'&module='.$return_module.'&record='.$return_id.'&assigned_user_id='.$current_user->id.'&type=inbound');
|
||||
} elseif(isset($_POST['return_id']) && $_POST['return_id'] != "") {
|
||||
$return_id = $_POST['return_id'];
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['quote_id']) && $_REQUEST['quote_id'] != '') {
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
$off = new EcmInsideOrder();
|
||||
$off->retrieve($_REQUEST['quote_id']);
|
||||
if(isset($off->id) && $off->id != '') {
|
||||
$off->format_all_fields();
|
||||
$off->email_id = $return_id;
|
||||
$off->save();
|
||||
}
|
||||
}
|
||||
header("Location: index.php?action=Emails&module=EcmInsideOrders&to_pdf=1&type=out"e_id=".$_REQUEST['quote_id']."&sended=1&pTypeFrom=Users&pIdFrom=".$_REQUEST['pIdFrom']."&pTypeTo=".$_REQUEST['pTypeTo']."&pIdTo=".$_REQUEST['pIdTo']."&bodyclass=".$_REQUEST['bodyclass']);
|
||||
|
||||
?>
|
||||
889
modules/EcmInsideOrders.cp/Emails.php
Executable file
889
modules/EcmInsideOrders.cp/Emails.php
Executable file
@@ -0,0 +1,889 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* EditView for Email
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
$toTemplate = '';
|
||||
if(isset($_REQUEST['pTypeTo']) && $_REQUEST['pTypeTo']!='' && isset($_REQUEST['pIdTo']) && $_REQUEST['pIdTo']!='') {
|
||||
if($_REQUEST['pTypeTo'] == "Accounts") {
|
||||
require_once('modules/Accounts/Account.php');
|
||||
$acc = new Account();
|
||||
$acc->retrieve($_REQUEST['pIdTo']);
|
||||
if(isset($acc->id) && $acc->id!='') {
|
||||
$_REQUEST['to_addrs'] = $acc->name.' <'.$acc->email1.'>; ';
|
||||
}
|
||||
}
|
||||
if($_REQUEST['pTypeTo'] == "Contacts") {
|
||||
require_once('modules/Contacts/Contact.php');
|
||||
$con = new Contact();
|
||||
$con->retrieve($_REQUEST['pIdTo']);
|
||||
if(isset($con->id) && $con->id!='') {
|
||||
$_REQUEST['to_addrs'] = $con->name.' <'.$con->email1.'>; ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['pTypeTo']) && $_REQUEST['pTypeTo']!='')
|
||||
if($_REQUEST['pTypeTo'] == "Accounts") $toTemplate = 'QuoteTemplateAccount';
|
||||
else
|
||||
if($_REQUEST['pTypeTo'] == "Contacts") $toTemplate = 'QuoteTemplateContact';
|
||||
|
||||
|
||||
if(isset($_REQUEST['pTypeFrom']) && $_REQUEST['pTypeFrom']!='' && isset($_REQUEST['pIdFrom']) && $_REQUEST['pIdFrom']!='') {
|
||||
if($_REQUEST['pTypeFrom'] == "Users") {
|
||||
require_once('modules/Users/User.php');
|
||||
$us = new User();
|
||||
global $current_user;
|
||||
$us->retrieve($current_user->id);//$_REQUEST['pIdFrom']);
|
||||
if(isset($us->id) && $us->id!='') {
|
||||
$_REQUEST['from_addr'] = $us->name.' <'.$us->email1.'>; ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo '<script type="text/javascript">var asynchronous_key = "'.$_SESSION['asynchronous_key'].'";</script>';
|
||||
|
||||
$GLOBALS['log']->info("Email edit view");
|
||||
|
||||
require_once('include/SugarTinyMCE.php');
|
||||
require_once('modules/Emails/Email.php');
|
||||
require_once('modules/EmailTemplates/EmailTemplate.php');
|
||||
require_once('XTemplate/xtpl.php');
|
||||
|
||||
global $theme;
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
require_once($theme_path.'layout_utils.php');
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $current_user;
|
||||
global $sugar_version, $sugar_config;
|
||||
global $timedate;
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
|
||||
$OPT = array();
|
||||
if(isset($_REQUEST['quote_id']) && $_REQUEST['quote_id']!='') {
|
||||
$OPT['quote_id'] = $_REQUEST['quote_id'];
|
||||
} else $OPT['quote_id'] = '';
|
||||
|
||||
if(isset($_REQUEST['sended']) && $_REQUEST['sended']!='') {
|
||||
$OPT['sended'] = $_REQUEST['sended'];
|
||||
} else $OPT['sended'] = '0';
|
||||
|
||||
|
||||
$json = getJSONobj();
|
||||
echo '<script language="javascript">
|
||||
|
||||
var OPT = '.$json->encode($OPT).';
|
||||
function quoteAlert(method) {
|
||||
if(OPT[\'quote_id\']==\'\') {
|
||||
alert(\'Quote not saved!\');
|
||||
return false;
|
||||
}
|
||||
if(method == \'save\') {
|
||||
prepSave(); document.forms.EditView.action.value=\'EmailSave\'; document.forms.EditView.send.value=\'1\'; document.forms.EditView.type.value=\'out\'; return fill_form(\'out\', \''.$mod_strings['ERR_NOT_ADDRESSED'].'\');
|
||||
}
|
||||
if(method == \'save_draft\') {
|
||||
document.forms.EditView.action.value=\'EmailSave\'; document.forms.EditView.send.value=\'0\'; document.forms.EditView.type.value=\'draft\'; fill_form(\'draft\', \''.$mod_strings['ERR_NOT_ADDRESSED'].'\');
|
||||
}
|
||||
};
|
||||
if(OPT[\'sended\']==\'1\') alert(\'Email was sended\');
|
||||
</script>';
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// PREPROCESS BEAN DATA FOR DISPLAY
|
||||
$focus = new Email();
|
||||
$email_type = 'archived';
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
if(!empty($_REQUEST['type'])) {
|
||||
$email_type = $_REQUEST['type'];
|
||||
} elseif(!empty($focus->id)) {
|
||||
$email_type = $focus->type;
|
||||
}
|
||||
|
||||
$focus->type = $email_type;
|
||||
|
||||
//needed when creating a new email with default values passed in
|
||||
if(isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) {
|
||||
$focus->contact_name = $_REQUEST['contact_name'];
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST['load_id']) && !empty($beanList[$_REQUEST['load_module']])) {
|
||||
$class_name = $beanList[$_REQUEST['load_module']];
|
||||
require_once($beanFiles[$class_name]);
|
||||
$contact = new $class_name();
|
||||
if($contact->retrieve($_REQUEST['load_id'])) {
|
||||
$link_id = $class_name . '_id';
|
||||
$focus->$link_id = $_REQUEST['load_id'];
|
||||
$focus->contact_name = (isset($contact->full_name)) ? $contact->full_name : $contact->name;
|
||||
$focus->to_addrs_names = $focus->contact_name;
|
||||
$focus->to_addrs_ids = $_REQUEST['load_id'];
|
||||
//Retrieve the email address.
|
||||
//If Opportunity or Case then Oppurtinity/Case->Accounts->(email_addr_bean_rel->email_addresses)
|
||||
//If Contacts, Leads etc.. then Contact->(email_addr_bean_rel->email_addresses)
|
||||
$sugarEmailAddress = new SugarEmailAddress();
|
||||
if($class_name == 'Opportunity' || $class_name == 'aCase'){
|
||||
$account = new Account();
|
||||
if($contact->account_id != null && $account->retrieve($contact->account_id)){
|
||||
$sugarEmailAddress->handleLegacyRetrieve($account);
|
||||
if(isset($account->email1)){
|
||||
$focus->to_addrs_emails = $account->email1;
|
||||
$focus->to_addrs = "$focus->contact_name <$account->email1>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$sugarEmailAddress->handleLegacyRetrieve($contact);
|
||||
if(isset($contact->email1)){
|
||||
$focus->to_addrs_emails = $contact->email1;
|
||||
$focus->to_addrs = "$focus->contact_name <$contact->email1>";
|
||||
}
|
||||
}
|
||||
if(!empty($_REQUEST['parent_type']) && empty($app_list_strings['record_type_display'][$_REQUEST['parent_type']])){
|
||||
if(!empty($app_list_strings['record_type_display'][$_REQUEST['load_module']])){
|
||||
$_REQUEST['parent_type'] = $_REQUEST['load_module'];
|
||||
$_REQUEST['parent_id'] = $focus->contact_id;
|
||||
$_REQUEST['parent_name'] = $focus->to_addrs_names;
|
||||
} else {
|
||||
unset($_REQUEST['parent_type']);
|
||||
unset($_REQUEST['parent_id']);
|
||||
unset($_REQUEST['parent_name']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) {
|
||||
$focus->contact_id = $_REQUEST['contact_id'];
|
||||
}
|
||||
if(isset($_REQUEST['parent_name'])) {
|
||||
$focus->parent_name = $_REQUEST['parent_name'];
|
||||
}
|
||||
if(isset($_REQUEST['parent_id'])) {
|
||||
$focus->parent_id = $_REQUEST['parent_id'];
|
||||
}
|
||||
if(isset($_REQUEST['parent_type'])) {
|
||||
$focus->parent_type = $_REQUEST['parent_type'];
|
||||
}
|
||||
elseif(is_null($focus->parent_type)) {
|
||||
$focus->parent_type = $app_list_strings['record_type_default_key'];
|
||||
}
|
||||
if(isset($_REQUEST['to_email_addrs'])) {
|
||||
$focus->to_addrs = $_REQUEST['to_email_addrs'];
|
||||
}
|
||||
// needed when clicking through a Contacts detail view:
|
||||
if(isset($_REQUEST['to_addrs_ids'])) {
|
||||
$focus->to_addrs_ids = $_REQUEST['to_addrs_ids'];
|
||||
}
|
||||
if(isset($_REQUEST['to_addrs_emails'])) {
|
||||
$focus->to_addrs_emails = $_REQUEST['to_addrs_emails'];
|
||||
}
|
||||
if(isset($_REQUEST['to_addrs_names'])) {
|
||||
$focus->to_addrs_names = $_REQUEST['to_addrs_names'];
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['to_addrs'])) {
|
||||
$focus->to_addrs = $_REQUEST['to_addrs'];
|
||||
}// user's email, go through 3 levels of precedence:
|
||||
if(isset($_REQUEST['from_addr'])) {
|
||||
$focus->from_addr = $_REQUEST['from_addr'];
|
||||
}// user's email, go through 3 levels of precedence:
|
||||
$from = $current_user->getEmailInfo();
|
||||
//// END PREPROCESSING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// XTEMPLATE ASSIGNMENT
|
||||
if($email_type == 'archived') {
|
||||
// echo get_module_title('Emails', $mod_strings['LBL_ARCHIVED_MODULE_NAME'].":", true);
|
||||
$xtpl=new XTemplate('modules/Emails/EditViewArchive.html');
|
||||
} else {
|
||||
// echo get_module_title('Emails', $mod_strings['LBL_COMPOSE_MODULE_NAME'].":", true);
|
||||
$xtpl=new XTemplate('modules/EcmInsideOrders/Emails.html');
|
||||
}
|
||||
echo "\n</p>\n";
|
||||
|
||||
// CHECK USER'S EMAIL SETTINGS TO ENABLE/DISABLE 'SEND' BUTTON
|
||||
if(!$focus->check_email_settings() &&($email_type == 'out' || $email_type == 'draft')) {
|
||||
print "<font color='red'>".$mod_strings['WARNING_SETTINGS_NOT_CONF']." <a href='index.php?module=Users&action=EditView&record=".$current_user->id."&return_module=Emails&type=out&return_action=EditView'>".$mod_strings['LBL_EDIT_MY_SETTINGS']."</a></font>";
|
||||
$xtpl->assign("DISABLE_SEND", 'DISABLED');
|
||||
}
|
||||
|
||||
// CHECK THAT SERVER HAS A PLACE TO PUT UPLOADED TEMP FILES SO THAT ATTACHMENTS WILL WORK
|
||||
// cn: Bug 5995
|
||||
$tmpUploadDir = ini_get('upload_tmp_dir');
|
||||
if(!empty($tmpUploadDir)) {
|
||||
if(!is_writable($tmpUploadDir)) {
|
||||
echo "<font color='red'>{$mod_strings['WARNING_UPLOAD_DIR_NOT_WRITABLE']}</font>";
|
||||
}
|
||||
} else {
|
||||
//echo "<font color='red'>{$mod_strings['WARNING_NO_UPLOAD_DIR']}</font>";
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// INBOUND EMAIL HANDLING
|
||||
if(isset($_REQUEST['email_name'])) {
|
||||
$name = str_replace('_',' ',$_REQUEST['email_name']);
|
||||
}
|
||||
if(isset($_REQUEST['inbound_email_id'])) {
|
||||
$ieMail = new Email();
|
||||
$ieMail->retrieve($_REQUEST['inbound_email_id']);
|
||||
|
||||
$quoted = '';
|
||||
// cn: bug 9725: replies/forwards lose real content
|
||||
$quotedHtml = $ieMail->quoteHtmlEmail($ieMail->description_html);
|
||||
|
||||
// plain-text
|
||||
$desc = nl2br(trim($ieMail->description));
|
||||
|
||||
$exDesc = explode('<br />', $desc);
|
||||
foreach($exDesc as $k => $line) {
|
||||
$quoted .= '> '.trim($line)."\r";
|
||||
}
|
||||
|
||||
// prefill empties with the other's contents
|
||||
if(empty($quotedHtml) && !empty($quoted)) {
|
||||
$quotedHtml = nl2br($quoted);
|
||||
}
|
||||
if(empty($quoted) && !empty($quotedHtml)) {
|
||||
$quoted = strip_tags(br2nl($quotedHtml));
|
||||
}
|
||||
|
||||
// forwards have special text
|
||||
if($_REQUEST['type'] == 'forward') {
|
||||
$header = $ieMail->getForwardHeader();
|
||||
// subject is handled in Subject line handling below
|
||||
} else {
|
||||
// we have a reply in focus
|
||||
$header = $ieMail->getReplyHeader();
|
||||
}
|
||||
|
||||
$quoted = br2nl($header.$quoted);
|
||||
$quotedHtml = $header.$quotedHtml;
|
||||
|
||||
|
||||
// if not a forward: it's a reply
|
||||
if($_REQUEST['type'] != 'forward') {
|
||||
$ieMailName = 'RE: '.$ieMail->name;
|
||||
} else {
|
||||
$ieMailName = $ieMail->name;
|
||||
}
|
||||
|
||||
$focus->id = null; // nulling this to prevent overwriting a replied email(we're basically doing a "Duplicate" function)
|
||||
$focus->to_addrs = $ieMail->from_addr;
|
||||
$focus->description = $quoted; // don't know what i was thinking: ''; // this will be filled on save/send
|
||||
$focus->description_html = $quotedHtml; // cn: bug 7357 - htmlentities() breaks FCKEditor
|
||||
$focus->parent_type = $ieMail->parent_type;
|
||||
$focus->parent_id = $ieMail->parent_id;
|
||||
$focus->parent_name = $ieMail->parent_name;
|
||||
$focus->name = $ieMailName;
|
||||
$xtpl->assign('INBOUND_EMAIL_ID',$_REQUEST['inbound_email_id']);
|
||||
// un/READ flags
|
||||
if(!empty($ieMail->status)) {
|
||||
// "Read" flag for InboundEmail
|
||||
if($ieMail->status == 'unread') {
|
||||
// creating a new instance here to avoid data corruption below
|
||||
$e = new Email();
|
||||
$e->retrieve($ieMail->id);
|
||||
$e->status = 'read';
|
||||
$e->save();
|
||||
$email_type = $e->status;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//// PRIMARY PARENT LINKING
|
||||
if(empty($focus->parent_type) && empty($focus->parent_id)) {
|
||||
$focus->fillPrimaryParentFields();
|
||||
}
|
||||
//// END PRIMARY PARENT LINKING
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// setup for my/mailbox email switcher
|
||||
$mbox = $ieMail->getMailboxDefaultEmail();
|
||||
$user = $current_user->getPreferredEmail();
|
||||
$useGroup = ' <input id="use_mbox" name="use_mbox" type="checkbox" CHECKED onClick="switchEmail()" >
|
||||
<script type="text/javascript">
|
||||
function switchEmail() {
|
||||
var mboxName = "'.$mbox['name'].'";
|
||||
var mboxAddr = "'.$mbox['email'].'";
|
||||
var userName = "'.$user['name'].'";
|
||||
var userAddr = "'.$user['email'].'";
|
||||
|
||||
if(document.getElementById("use_mbox").checked) {
|
||||
document.getElementById("from_addr_field").value = mboxName + " <" + mboxAddr + ">";
|
||||
document.getElementById("from_addr_name").value = mboxName;
|
||||
document.getElementById("from_addr_email").value = mboxAddr;
|
||||
} else {
|
||||
document.getElementById("from_addr_field").value = userName + " <" + userAddr + ">";
|
||||
document.getElementById("from_addr_name").value = userName;
|
||||
document.getElementById("from_addr_email").value = userAddr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>';
|
||||
$useGroup .= $mod_strings['LBL_USE_MAILBOX_INFO'];
|
||||
|
||||
$xtpl->assign('FROM_ADDR_GROUP', $useGroup);
|
||||
}
|
||||
//// END INBOUND EMAIL HANDLING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// SUBJECT FIELD MANIPULATION
|
||||
$name = '';
|
||||
if(!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type'])) {
|
||||
$focus->parent_id = $_REQUEST['parent_id'];
|
||||
$focus->parent_type = $_REQUEST['parent_type'];
|
||||
}
|
||||
if(!empty($focus->parent_id) && !empty($focus->parent_type)) {
|
||||
if($focus->parent_type == 'Cases') {
|
||||
require_once('modules/Cases/Case.php');
|
||||
$myCase = new aCase();
|
||||
$myCase->retrieve($focus->parent_id);
|
||||
$myCaseMacro = $myCase->getEmailSubjectMacro();
|
||||
if(isset($ieMail->name) && !empty($ieMail->name)) { // if replying directly to an InboundEmail
|
||||
$oldEmailSubj = $ieMail->name;
|
||||
} elseif(isset($_REQUEST['parent_name']) && !empty($_REQUEST['parent_name'])) {
|
||||
$oldEmailSubj = $_REQUEST['parent_name'];
|
||||
} else {
|
||||
$oldEmailSubj = $focus->name; // replying to an email using old subject
|
||||
}
|
||||
|
||||
if(!preg_match('/^re:/i', $oldEmailSubj)) {
|
||||
$oldEmailSubj = 'RE: '.$oldEmailSubj;
|
||||
}
|
||||
$focus->name = $oldEmailSubj;
|
||||
|
||||
if(strpos($focus->name, str_replace('%1',$myCase->case_number,$myCaseMacro))) {
|
||||
$name = $focus->name;
|
||||
} else {
|
||||
$name = $focus->name.' '.str_replace('%1',$myCase->case_number,$myCaseMacro);
|
||||
}
|
||||
} else {
|
||||
$name = $focus->name;
|
||||
}
|
||||
} else {
|
||||
if(empty($focus->name)) {
|
||||
$name = '';
|
||||
} else {
|
||||
$name = $focus->name;
|
||||
}
|
||||
}
|
||||
if($email_type == 'forward') {
|
||||
$name = 'FW: '.$name;
|
||||
}
|
||||
//// END SUBJECT FIELD MANIPULATION
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// GENERAL TEMPLATE ASSIGNMENTS
|
||||
$xtpl->assign('MOD', return_module_language($current_language, 'Emails'));
|
||||
$xtpl->assign('APP', $app_strings);
|
||||
|
||||
if(!isset($focus->id)) $xtpl->assign('USER_ID', $current_user->id);
|
||||
if(!isset($focus->id) && isset($_REQUEST['contact_id'])) $xtpl->assign('CONTACT_ID', $_REQUEST['contact_id']);
|
||||
|
||||
$xtpl->assign("QUOTE_ID",$_REQUEST['quote_id']);
|
||||
if(isset($_REQUEST['return_module']) && !empty($_REQUEST['return_module'])) {
|
||||
$xtpl->assign('RETURN_MODULE', $_REQUEST['return_module']);
|
||||
} else {
|
||||
$xtpl->assign('RETURN_MODULE', 'Emails');
|
||||
}
|
||||
if(isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action']) && ($_REQUEST['return_action'] != 'SubPanelViewer')) {
|
||||
$xtpl->assign('RETURN_ACTION', $_REQUEST['return_action']);
|
||||
} else {
|
||||
$xtpl->assign('RETURN_ACTION', 'DetailView');
|
||||
}
|
||||
if(isset($_REQUEST['return_id']) && !empty($_REQUEST['return_id'])) {
|
||||
$xtpl->assign('RETURN_ID', $_REQUEST['return_id']);
|
||||
}
|
||||
// handle Create $module then Cancel
|
||||
if(empty($_REQUEST['return_id']) && !isset($_REQUEST['type'])) {
|
||||
$xtpl->assign('RETURN_ACTION', 'index');
|
||||
}
|
||||
|
||||
$xtpl->assign('THEME', $theme);
|
||||
$xtpl->assign('IMAGE_PATH', $image_path);$xtpl->assign('PRINT_URL', 'index.php?'.$GLOBALS['request_string']);
|
||||
|
||||
if(isset($_REQUEST['bodyclass']) && $_REQUEST['bodyclass'] != '') $xtpl->assign('BODYCLASS',$_REQUEST['bodyclass']);
|
||||
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
$m = new EcmInsideOrder();
|
||||
$mfp = $m->loadParserArray('email');
|
||||
$xtpl->assign("MFP",$mfp);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// QUICKSEARCH CODE
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('parent_name' => $qsd->getQSParent(),
|
||||
'assigned_user_name' => $qsd->getQSUser(),
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$quicksearch_js = $qsd->getQSScripts();
|
||||
$sqs_objects_encoded = $json->encode($sqs_objects);
|
||||
$quicksearch_js .= <<<EOQ
|
||||
<script type="text/javascript" language="javascript">sqs_objects = $sqs_objects_encoded;
|
||||
function changeQS() {
|
||||
//new_module = document.getElementById('parent_type').value;
|
||||
new_module = document.EditView.parent_type.value;
|
||||
if(new_module == 'Contacts' || new_module == 'Leads' || typeof(disabledModules[new_module]) != 'undefined') {
|
||||
sqs_objects['parent_name']['disable'] = true;
|
||||
document.getElementById('parent_name').readOnly = true;
|
||||
}
|
||||
else {
|
||||
sqs_objects['parent_name']['disable'] = false;
|
||||
document.getElementById('parent_name').readOnly = false;
|
||||
}
|
||||
|
||||
sqs_objects['parent_name']['module'] = new_module;
|
||||
}
|
||||
changeQS();
|
||||
</script>
|
||||
EOQ;
|
||||
$xtpl->assign('JAVASCRIPT', get_set_focus_js().$quicksearch_js);
|
||||
//// END QUICKSEARCH CODE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// cn: bug 14191 - duping archive emails overwrites the original
|
||||
if(!isset($_REQUEST['isDuplicate']) || $_REQUEST['isDuplicate'] != 'true') {
|
||||
$xtpl->assign('ID', $focus->id);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['parent_type']) && !empty($_REQUEST['parent_type']) && isset($_REQUEST['parent_id']) && !empty($_REQUEST['parent_id'])) {
|
||||
$xtpl->assign('OBJECT_ID', $_REQUEST['parent_id']);
|
||||
$xtpl->assign('OBJECT_TYPE', $_REQUEST['parent_type']);
|
||||
}
|
||||
|
||||
$xtpl->assign('FROM_ADDR', $focus->from_addr);
|
||||
//// prevent TO: prefill when type is 'forward'
|
||||
if($email_type != 'forward') {
|
||||
$xtpl->assign('TO_ADDRS', $focus->to_addrs);
|
||||
$xtpl->assign('FROM_ADDRS', $focus->from_addrs);
|
||||
$xtpl->assign('TO_ADDRS_IDS', $focus->to_addrs_ids);
|
||||
$xtpl->assign('TO_ADDRS_NAMES', $focus->to_addrs_names);
|
||||
$xtpl->assign('TO_ADDRS_EMAILS', $focus->to_addrs_emails);
|
||||
$xtpl->assign('CC_ADDRS', $focus->cc_addrs);
|
||||
$xtpl->assign('CC_ADDRS_IDS', $focus->cc_addrs_ids);
|
||||
$xtpl->assign('CC_ADDRS_NAMES', $focus->cc_addrs_names);
|
||||
$xtpl->assign('CC_ADDRS_EMAILS', $focus->cc_addrs_emails);
|
||||
$xtpl->assign('BCC_ADDRS', $focus->bcc_addrs);
|
||||
$xtpl->assign('BCC_ADDRS_IDS', $focus->bcc_addrs_ids);
|
||||
$xtpl->assign('BCC_ADDRS_NAMES', $focus->bcc_addrs_names);
|
||||
$xtpl->assign('BCC_ADDRS_EMAILS', $focus->bcc_addrs_emails);
|
||||
}
|
||||
|
||||
//$xtpl->assign('FROM_ADDR', $from['name'].' <'.$from['email'].'>');
|
||||
$xtpl->assign('FROM_ADDR_NAME', $from['name']);
|
||||
$xtpl->assign('FROM_ADDR_EMAIL', $from['email']);
|
||||
|
||||
$xtpl->assign('NAME', from_html($name));
|
||||
//$xtpl->assign('DESCRIPTION_HTML', from_html($focus->description_html));
|
||||
$xtpl->assign('DESCRIPTION', $focus->description);
|
||||
$xtpl->assign('TYPE',$email_type);
|
||||
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// $xtpl->assign('CALENDAR_LANG',((empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language]));
|
||||
$xtpl->assign('CALENDAR_LANG', 'en');
|
||||
$xtpl->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());
|
||||
$xtpl->assign('DATE_START', $focus->date_start);
|
||||
$xtpl->assign('TIME_FORMAT', '('. $timedate->get_user_time_format().')');
|
||||
$xtpl->assign('TIME_START', substr($focus->time_start,0,5));
|
||||
$xtpl->assign('TIME_MERIDIEM', $timedate->AMPMMenu('',$focus->time_start));
|
||||
|
||||
$parent_types = $app_list_strings['record_type_display'];
|
||||
$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
|
||||
|
||||
foreach($disabled_parent_types as $disabled_parent_type){
|
||||
if($disabled_parent_type != $focus->parent_type){
|
||||
unset($parent_types[$disabled_parent_type]);
|
||||
}
|
||||
}
|
||||
|
||||
$xtpl->assign('TYPE_OPTIONS', get_select_options_with_id($parent_types, $focus->parent_type));
|
||||
$xtpl->assign('USER_DATEFORMAT', '('. $timedate->get_user_date_format().')');
|
||||
$xtpl->assign('PARENT_NAME', $focus->parent_name);
|
||||
$xtpl->assign('PARENT_ID', $focus->parent_id);
|
||||
if(empty($focus->parent_type)) {
|
||||
$xtpl->assign('PARENT_RECORD_TYPE', '');
|
||||
} else {
|
||||
$xtpl->assign('PARENT_RECORD_TYPE', $focus->parent_type);
|
||||
}
|
||||
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$record = '';
|
||||
if(!empty($_REQUEST['record'])){
|
||||
$record = $_REQUEST['record'];
|
||||
}
|
||||
$xtpl->assign('ADMIN_EDIT',"<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
//// END GENERAL TEMPLATE ASSIGNMENTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'parent_id',
|
||||
'name' => 'parent_name',
|
||||
),
|
||||
);
|
||||
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
/// Users Popup
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'assigned_user_id',
|
||||
'user_name' => 'assigned_user_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
$change_parent_button = '<input type="button" name="button" tabindex="2" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $app_strings['LBL_SELECT_BUTTON_LABEL'] . '" '
|
||||
. "onclick='open_popup(document.EditView.parent_type.value,600,400,\"&tree=ProductsProd\",true,false,$encoded_popup_request_data);' />\n";
|
||||
$xtpl->assign("CHANGE_PARENT_BUTTON", $change_parent_button);
|
||||
|
||||
$button_attr = '';
|
||||
if(!ACLController::checkAccess('Contacts', 'list', true)){
|
||||
$button_attr = 'disabled="disabled"';
|
||||
}
|
||||
|
||||
$change_to_addrs_button = '<input type="button" name="to_button" tabindex="3" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $mod_strings['LBL_EMAIL_SELECTOR'] . '" '
|
||||
. "onclick='button_change_onclick(this);' $button_attr />\n";
|
||||
$xtpl->assign("CHANGE_TO_ADDRS_BUTTON", $change_to_addrs_button);
|
||||
|
||||
$change_cc_addrs_button = '<input type="button" name="cc_button" tabindex="3" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $mod_strings['LBL_EMAIL_SELECTOR'] . '" '
|
||||
. "onclick='button_change_onclick(this);' $button_attr />\n";
|
||||
$xtpl->assign("CHANGE_CC_ADDRS_BUTTON", $change_cc_addrs_button);
|
||||
|
||||
$change_bcc_addrs_button = '<input type="button" name="bcc_button" tabindex="3" class="button" '
|
||||
. 'title="' . $app_strings['LBL_SELECT_BUTTON_TITLE'] . '" '
|
||||
. 'accesskey="' . $app_strings['LBL_SELECT_BUTTON_KEY'] . '" '
|
||||
. 'value="' . $mod_strings['LBL_EMAIL_SELECTOR'] . '" '
|
||||
. "onclick='button_change_onclick(this);' $button_attr />\n";
|
||||
$xtpl->assign("CHANGE_BCC_ADDRS_BUTTON", $change_bcc_addrs_button);
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
//// USER ASSIGNMENT
|
||||
global $current_user;
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
|
||||
$record = '';
|
||||
if(!empty($_REQUEST['record'])) {
|
||||
$record = $_REQUEST['record'];
|
||||
}
|
||||
$xtpl->assign('ADMIN_EDIT',"<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
if(empty($focus->assigned_user_id) && empty($focus->id))
|
||||
$focus->assigned_user_id = $current_user->id;
|
||||
if(empty($focus->assigned_name) && empty($focus->id))
|
||||
$focus->assigned_user_name = $current_user->user_name;
|
||||
$xtpl->assign('ASSIGNED_USER_OPTIONS', get_select_options_with_id(get_user_array(TRUE, 'Active', $focus->assigned_user_id), $focus->assigned_user_id));
|
||||
$xtpl->assign('ASSIGNED_USER_NAME', $focus->assigned_user_name);
|
||||
$xtpl->assign('ASSIGNED_USER_ID', $focus->assigned_user_id);
|
||||
$xtpl->assign('DURATION_HOURS', $focus->duration_hours);
|
||||
$xtpl->assign('TYPE_OPTIONS', get_select_options_with_id($parent_types, $focus->parent_type));
|
||||
$xtpl->assign("PIDFROM",$_REQUEST['pIdFrom']);
|
||||
$xtpl->assign("PTYPEFROM",$_REQUEST['pTypeFrom']);
|
||||
$xtpl->assign("PIDTO",$_REQUEST['pIdTo']);
|
||||
$xtpl->assign("PTYPETO",$_REQUEST['pTypeTo']);
|
||||
if(isset($focus->duration_minutes)) {
|
||||
$xtpl->assign('DURATION_MINUTES_OPTIONS', get_select_options_with_id($focus->minutes_values,$focus->duration_minutes));
|
||||
}
|
||||
//// END USER ASSIGNMENT
|
||||
///////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//Add Custom Fields
|
||||
require_once('modules/DynamicFields/templates/Files/EditView.php');
|
||||
require_once("modules/Notes/Note.php");
|
||||
|
||||
///////////////////////////////////////
|
||||
//// ATTACHMENTS
|
||||
$attachments = '';
|
||||
if(!empty($focus->id) || (!empty($_REQUEST['record']) && $_REQUEST['type'] == 'forward')) {
|
||||
|
||||
$attachments = "<input type='hidden' name='removeAttachment' id='removeAttachment' value=''>\n";
|
||||
$ids = '';
|
||||
|
||||
$focusId = empty($focus->id) ? $_REQUEST['record'] : $focus->id;
|
||||
$note = new Note();
|
||||
$where = "notes.parent_id='{$focusId}' AND notes.filename IS NOT NULL";
|
||||
$notes_list = $note->get_full_list("", $where,true);
|
||||
|
||||
if(!isset($notes_list)) {
|
||||
$notes_list = array();
|
||||
}
|
||||
for($i = 0;$i < count($notes_list);$i++) {
|
||||
$the_note = $notes_list[$i];
|
||||
if(empty($the_note->filename)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// cn: bug 8034 - attachments from forwards/replies lost when saving drafts
|
||||
if(!empty($ids)) {
|
||||
$ids .= ",";
|
||||
}
|
||||
$ids .= $the_note->id;
|
||||
|
||||
$attachments .= "
|
||||
<div id='noteDiv{$the_note->id}'>
|
||||
<img onclick='deletePriorAttachment(\"{$the_note->id}\");' src='themes/{$theme}/images/delete_inline.gif' value='{$the_note->id}'> ";
|
||||
$attachments .= '<a href="'.UploadFile::get_url($the_note->filename,$the_note->id).'" target="_blank">'. $the_note->filename .'</a></div>';
|
||||
|
||||
}
|
||||
// cn: bug 8034 - attachments from forwards/replies lost when saving drafts
|
||||
$attachments .= "<input type='hidden' name='prior_attachments' value='{$ids}'>";
|
||||
|
||||
// workaround $mod_strings being overriden by Note object instantiation above.
|
||||
global $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Emails');
|
||||
}
|
||||
|
||||
$attJs = '<script type="text/javascript">';
|
||||
$attJs .= 'var file_path = "'.$sugar_config['site_url'].'/'.$sugar_config['upload_dir'].'";';
|
||||
$attJs .= 'var lnk_remove = "'.$app_strings['LNK_REMOVE'].'";';
|
||||
$attJs .= '</script>';
|
||||
$xtpl->assign('ATTACHMENTS', $attachments);
|
||||
$xtpl->assign('ATTACHMENTS_JAVASCRIPT', $attJs);
|
||||
//// END ATTACHMENTS
|
||||
///////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// DOCUMENTS
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'document_set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'related_doc_id',
|
||||
'document_name' => 'related_document_name',
|
||||
),
|
||||
);
|
||||
$json = getJSONobj();
|
||||
$xtpl->assign('encoded_document_popup_request_data', $json->encode($popup_request_data));
|
||||
//// END DOCUMENTS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$parse_open = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($parse_open) {
|
||||
$xtpl->parse('main.open_source_1');
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//// EMAIL TEMPLATES
|
||||
if(ACLController::checkAccess('EmailTemplates', 'list', true) && ACLController::checkAccess('EmailTemplates', 'view', true)) {
|
||||
$et = new EmailTemplate();
|
||||
$etResult = $focus->db->query($et->create_list_query('','',''));
|
||||
$email_templates_arr[] = '';
|
||||
$toTemplateId = '';
|
||||
while($etA = $focus->db->fetchByAssoc($etResult)) {
|
||||
if($toTemplate == $etA['name']) { $toTemplateId = $etA['id']; }
|
||||
$email_templates_arr[$etA['id']] = $etA['name'];
|
||||
}
|
||||
} else {
|
||||
$email_templates_arr = array('' => $app_strings['LBL_NONE']);
|
||||
}
|
||||
|
||||
$xtpl->assign('EMAIL_TEMPLATE_OPTIONS', get_select_options_with_id($email_templates_arr, $toTemplateId));
|
||||
//// END EMAIL TEMPLATES
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////
|
||||
//// TEXT EDITOR
|
||||
// cascade from User to Sys Default
|
||||
$editor = $focus->getUserEditorPreference();
|
||||
|
||||
if($editor != 'plain') {
|
||||
// this box is checked by Javascript on-load.
|
||||
$xtpl->assign('EMAIL_EDITOR_OPTION', 'CHECKED');
|
||||
}
|
||||
$description_html = from_html($focus->description_html);
|
||||
$description = $focus->description;
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
// signatures
|
||||
if($sig = $current_user->getDefaultSignature()) {
|
||||
if(!$focus->hasSignatureInBody($sig) && $focus->type != 'draft') {
|
||||
if($current_user->getPreference('signature_prepend')) {
|
||||
$description_html = '<br />'.from_html($sig['signature_html']).'<br /><br />'.$description_html;
|
||||
$description = "\n".$sig['signature']."\n\n".$description;
|
||||
} else {
|
||||
$description_html .= '<br /><br />'.from_html($sig['signature_html']);
|
||||
$description = $description."\n\n".$sig['signature'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$xtpl->assign('DESCRIPTION', $description);
|
||||
// sigs
|
||||
/////////////////////////////////////////////////
|
||||
$tiny = new SugarTinyMCE();
|
||||
$ed = $tiny->getInstance("description_html");
|
||||
$xtpl->assign("TINY", $ed);
|
||||
$xtpl->assign("DESCRIPTION_HTML", $description_html);
|
||||
|
||||
if((!isset($_REQUEST['record']) || $_REQUEST['record'] == '') && isset($toTemplateId) && $toTemplateId != "") {
|
||||
require_once('modules/EmailTemplates/EmailTemplate.php');
|
||||
$et = new EmailTemplate();
|
||||
$et->retrieve($toTemplateId);
|
||||
if(isset($et->id) && $et->id != '') {
|
||||
$xtpl->assign("NAME",$et->subject);
|
||||
$xtpl->assign("DESCRIPTION",$et->body);
|
||||
$xtpl->assign("DESCRIPTION_HTML",$et->body_html);
|
||||
}
|
||||
}
|
||||
|
||||
$xtpl->parse('main.htmlarea');
|
||||
//// END TEXT EDITOR
|
||||
///////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////
|
||||
//// SPECIAL INBOUND LANDING SCREEN ASSIGNS
|
||||
if(!empty($_REQUEST['inbound_email_id'])) {
|
||||
if(!empty($_REQUEST['start'])) {
|
||||
$parts = $focus->getStartPage(base64_decode($_REQUEST['start']));
|
||||
$xtpl->assign('RETURN_ACTION', $parts['action']);
|
||||
$xtpl->assign('RETURN_MODULE', $parts['module']);
|
||||
$xtpl->assign('GROUP', $parts['group']);
|
||||
}
|
||||
$xtpl->assign('ASSIGNED_USER_ID', $current_user->id);
|
||||
$xtpl->assign('MYINBOX', 'this.form.type.value=\'inbound\';');
|
||||
}
|
||||
//// END SPECIAL INBOUND LANDING SCREEN ASSIGNS
|
||||
///////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
echo '<script>var disabledModules='. $json->encode($disabled_parent_types) . ';</script>';
|
||||
$jsVars = 'var lbl_send_anyways = "'.$mod_strings['LBL_SEND_ANYWAYS'].'";';
|
||||
$xtpl->assign('JS_VARS', $jsVars);
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
echo '<script>checkParentType(document.EditView.parent_type.value, document.EditView.change_parent);</script>';
|
||||
//// END XTEMPLATE ASSIGNMENT
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('email_EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$skip_fields = array();
|
||||
if($email_type == 'out') {
|
||||
$skip_fields['name'] = 1;
|
||||
$skip_fields['date_start'] = 1;
|
||||
}
|
||||
$javascript->addAllFields('',$skip_fields);
|
||||
$javascript->addToValidateBinaryDependency('parent_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_MEMBER_OF'], 'false', '', 'parent_id');
|
||||
$javascript->addToValidateBinaryDependency('parent_type', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $mod_strings['LBL_MEMBER_OF'], 'false', '', 'parent_id');
|
||||
|
||||
|
||||
|
||||
|
||||
$javascript->addToValidateBinaryDependency('user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
|
||||
if($email_type == 'archived') {
|
||||
$javascript->addFieldIsValidDate('date_start', 'date', $mod_strings['LBL_DATE'], $mod_strings['ERR_DATE_START'], true);
|
||||
$javascript->addFieldIsValidTime('time_start', 'time', $mod_strings['LBL_TIME'], $mod_strings['ERR_TIME_START'], true);
|
||||
}
|
||||
echo $javascript->getScript();
|
||||
65
modules/EcmInsideOrders.cp/Forms.php
Executable file
65
modules/EcmInsideOrders.cp/Forms.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* CREATE JAVASCRIPT TO VALIDATE THE DATA ENTERED INTO A RECORD.
|
||||
*******************************************************************************/
|
||||
function get_validate_record_js () {
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* CREATE FORM FOR MENU RAPID CREATE
|
||||
*******************************************************************************/
|
||||
function get_new_record_form () {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
107
modules/EcmInsideOrders.cp/ListProduction.php
Executable file
107
modules/EcmInsideOrders.cp/ListProduction.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
if(!$_REQUEST['m'])$_REQUEST['m']=1;
|
||||
?>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0"><tr><td><img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts" width="16" border="0" height="16"></td><td><h2>Zamówienie towaru: Lista produktów </h2></td></tr></table><br />
|
||||
<ul class="tablist" style="width:100%;">
|
||||
<li>
|
||||
<a class="current" href="#">Podstawowe wyszukiwanie</a>
|
||||
</li>
|
||||
</ul>
|
||||
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">Średnia sprzedaży w ostatnich 3 miesiącach * </td>
|
||||
<td class="dataField" nowrap="nowrap">
|
||||
<input name="m" tabindex="" id="m" size="1" style="width:13px;" value="<?php echo $_REQUEST['m'];?>" title="" type="text">
|
||||
> Inwentarz
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="button" class="button" name="search" value="Szukaj" onclick="location.href='index.php?module=EcmInsideOrders&action=ListProduction&m='+document.getElementById('m').value;" /><br /><br />
|
||||
|
||||
<?php
|
||||
include_once("modules/EcmSales/productionHelper.php");
|
||||
|
||||
$t.='<form method="post" action="index.php?module=EcmInsideOrders&action=EditView&production=1">';
|
||||
$t.=$tbs;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.=" ";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Index";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Nazwa";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Składniki";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Ilość 3m";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Inwentarz";
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$z="select * from ecmproducts where deleted='0' order by code asc";
|
||||
$w=mysql_query($z);
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$i++;
|
||||
$inv=getStatesFromMainInventory($r['id']);
|
||||
$sales=getSalesLast3m($r['id']);
|
||||
$com=hasComponents($r['id']);
|
||||
if($_REQUEST['m']*$inv>=$sales || $com==0)continue;
|
||||
$t.=$trs;
|
||||
$t.=$tds;
|
||||
$t.='<input type="checkbox" name="check[]" value="'.$r['id'].'">';
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=$r['code'];
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.='<a href="index.php?module=EcmProducts&action=DetailView&record='.$r['id'].'">'.$r['name'].'</a>';
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=(int)$com;
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=number_format($sales,0,",",".");
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=((int)$inv);
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$sum_inv+=$inv;
|
||||
$sum_sales+=$sales;
|
||||
}
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.=" ";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=" ";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=" ";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=" ";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=number_format(($sum_sales)/$i,2,",",".");
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=(int)$sum_inv;
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
|
||||
$t.=$tbe;
|
||||
$t.='<input type="submit" class="button" name="make_production" value="Utwórz zamówienie" />';
|
||||
$t.='</form>';
|
||||
echo $t;
|
||||
?>
|
||||
40
modules/EcmInsideOrders.cp/ListView.php
Executable file
40
modules/EcmInsideOrders.cp/ListView.php
Executable file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
require_once('modules/EcmInsideOrders/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
else {}
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
if(file_exists('modules/EcmInsideOrders/views/view.list.php')) {
|
||||
require_once('modules/EcmInsideOrders/views/view.list.php');
|
||||
$list = new EcmInsideOrdersViewList();
|
||||
}
|
||||
else {
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
$list = new ViewList();
|
||||
}
|
||||
|
||||
$list->bean = $focus;
|
||||
$list->module='EcmInsideOrders';
|
||||
|
||||
// if(!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true") require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
$list->preDisplay();
|
||||
$list->display();
|
||||
|
||||
?>
|
||||
122
modules/EcmInsideOrders.cp/Menu.php
Executable file
122
modules/EcmInsideOrders.cp/Menu.php
Executable file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
// require_once('modules/EcmGroupSales/Menu.php');
|
||||
|
||||
|
||||
global $mod_strings, $current_user;
|
||||
/*
|
||||
if(ACLController::checkAccess('EcmInsideOrders', "edit", true)) $module_menu [] = Array("index.php?module=".'EcmInsideOrders'."&action=EditView&return_module=".'EcmInsideOrders'."&return_action=DetailView", $mod_strings['LNK_NEW_'.'ECMINSIDEORDER'],"CreateEcmInsideOrders", 'EcmInsideOrders');
|
||||
|
||||
if(ACLController::checkAccess('EcmInsideOrders', 'list', true))
|
||||
$module_menu [] = Array("index.php?module=".'EcmInsideOrders'."&action=index&return_module=".'EcmInsideOrders'."&return_action=DetailView", $mod_strings['LNK_'.'ECMINSIDEORDERS'.'_LIST'],"EcmInsideOrders", 'EcmInsideOrders');
|
||||
*/
|
||||
|
||||
//if(ACLController::checkAccess('EcmInsideOrders', "edit", true))
|
||||
|
||||
$module_menu [] = Array("index.php?module=".'EcmInsideOrders'."&action=EditView&return_module=".'EcmInsideOrders'."&return_action=DetailView", translate('LNK_NEW_'.'ECMINSIDEORDER', 'EcmInsideOrders'),"CreateEcmInsideOrders", 'EcmInsideOrders');
|
||||
|
||||
//if(ACLController::checkAccess('EcmInsideOrders', "list", true))
|
||||
|
||||
$module_menu [] = Array("index.php?module=EcmInsideOrders&action=index&return_module=EcmInsideOrders&return_action=DetailView", translate('LNK_ECMINSIDEORDERS_LIST','EcmInsideOrders'),"EcmInsideOrders", 'EcmInsideOrders');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
223
modules/EcmInsideOrders.cp/ModuleFieldsParser/ModuleFieldsParser.php
Executable file
223
modules/EcmInsideOrders.cp/ModuleFieldsParser/ModuleFieldsParser.php
Executable file
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
class ModuleFieldsParser {
|
||||
|
||||
|
||||
|
||||
var $modules;
|
||||
|
||||
var $name;
|
||||
|
||||
|
||||
|
||||
function ModuleFieldsParser($name = 'mfp') {
|
||||
|
||||
$this->modules = Array();
|
||||
|
||||
if(file_exists('modules/EcmInsideOrders/ModuleFieldsParser/config.php')) {
|
||||
|
||||
require_once('modules/EcmInsideOrders/ModuleFieldsParser/config.php');
|
||||
|
||||
$this->modules = $mfp_modules;
|
||||
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getModulesSelectOptions($fieldRealNames = false) {
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
$arr = array();
|
||||
|
||||
if(count($this->modules)>0) {
|
||||
|
||||
foreach($this->modules as $key => $value) {
|
||||
|
||||
if(isset($value['name']) && $value['name'] != '')
|
||||
|
||||
if(isset($app_list_strings['moduleList'][$value['name']]) && $app_list_strings['moduleList'][$value['name']] != '')
|
||||
|
||||
$value['name'] = $app_list_strings['moduleList'][$value['name']];
|
||||
|
||||
$arr[$key]['name'] = $value['name'];
|
||||
|
||||
$arr[$key]['fields'] = $this->getModuleFieldsSelectOptions($key,$fieldRealNames);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getModuleFieldsSelectOptions($module,$fieldRealNames = false) {
|
||||
|
||||
global $beanList, $current_language, $GLOBALS;
|
||||
|
||||
$dict = null;
|
||||
|
||||
$file = 'cache/modules/'.$module.'/'.$beanList[$module].'vardefs.php';
|
||||
|
||||
if(file_exists($file)) {
|
||||
|
||||
include($file);
|
||||
|
||||
$dict = $GLOBALS['dictionary'][$beanList[$module]]['fields'];
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
$file = 'modules/'.$module.'/vardefs.php';
|
||||
|
||||
if(file_exists($file)) { include($file); $dict = $dictionary[$beanList[$module]]['fields']; }
|
||||
|
||||
}
|
||||
|
||||
if($dict) {
|
||||
|
||||
$mod = return_module_language($current_language, $module);
|
||||
|
||||
$arr = array();
|
||||
|
||||
foreach($dict as $key => $value) {
|
||||
|
||||
$tmp = '$'.$this->modules[$module]['prefix'].$value['name'];
|
||||
|
||||
if(!$fieldRealNames)
|
||||
|
||||
$arr[$tmp] = ((isset($mod[$value['vname']]) && $mod[$value['vname']] != '') ? $mod[$value['vname']] : $value['name']);
|
||||
|
||||
else
|
||||
|
||||
$arr[$tmp] = $value['name'];
|
||||
|
||||
}
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
return array();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getJS() {
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$js = '<script language="javascript">';
|
||||
|
||||
$js .= 'var '.$this->name.'_data = '.$json->encode($this->getModulesSelectOptions()).';';
|
||||
|
||||
$js .= 'function '.$this->name.'_loadModules() { var ms = document.getElementById("'.$this->name.'_module"); for(x in '.$this->name.'_data) { ms.options[ms.options.length] = new Option('.$this->name.'_data[x]["name"],x,false); }; }';
|
||||
|
||||
$js .= 'function '.$this->name.'_loadFields() { var ms = document.getElementById("'.$this->name.'_module"); var fs = document.getElementById("'.$this->name.'_fields"); while(fs.options.length>0) fs.remove(0); var fields = '.$this->name.'_data[ms.value]["fields"]; for(x in fields) fs.options[fs.options.length] = new Option(fields[x],x,false); fs.onchange(); };';
|
||||
|
||||
$js .= 'function '.$this->name.'_loadField() { var fs = document.getElementById("'.$this->name.'_fields"); var fe = document.getElementById("'.$this->name.'_field"); fe.value = fs.value; };';
|
||||
|
||||
$js .= $this->name.'_loadModules(); '.$this->name.'_loadFields(); '.$this->name.'_loadField();';
|
||||
|
||||
$js .= '</script>';
|
||||
|
||||
return $js;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getFormHTML($smarty = false, $name = '') {
|
||||
|
||||
if($name != '') $this->name = $name;
|
||||
|
||||
$html = '
|
||||
|
||||
<span>
|
||||
|
||||
<select id="'.$this->name.'_module" name="'.$this->name.'_module" onChange="'.$this->name.'_loadFields();"></select>
|
||||
|
||||
<select id="'.$this->name.'_fields" name="'.$this->name.'_fields" onChange="'.$this->name.'_loadField()"></select>
|
||||
|
||||
<input id="'.$this->name.'_field" name="'.$this->name.'_field" value="" size="40">'
|
||||
|
||||
.($smarty ? '{literal}' : '').$this->getJS().($smarty ? '{/literal}' : '').
|
||||
|
||||
'</span>';
|
||||
|
||||
return $html;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fillFocusToModules() {
|
||||
|
||||
foreach($this->modules as $key => $value) {
|
||||
|
||||
if((!isset($value['focus']) || $value['focus'] == '') && (isset($value['id']) && $value['id'] != '')) {
|
||||
|
||||
global $beanFiles, $beanList;
|
||||
|
||||
$path = $beanFiles[$beanList[$key]];
|
||||
|
||||
if(file_exists($path)) {
|
||||
|
||||
require_once($path);
|
||||
|
||||
$this->modules[$key]['focus'] = new $beanList[$key]();
|
||||
|
||||
$this->modules[$key]['focus']->format_all_fields();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function parseText($text) {
|
||||
|
||||
$this->fillFocusToModules();
|
||||
|
||||
$temp = $this->getModulesSelectOptions(true);
|
||||
|
||||
foreach($this->modules as $module => $arr) {
|
||||
|
||||
if(isset($arr['focus']) && $arr['focus']!='') {
|
||||
|
||||
foreach($temp[$module]['fields'] as $field => $value) {
|
||||
|
||||
$text = str_replace($field,((isset($this->modules[$module]['focus']->$value) && $this->modules[$module]['focus']->$value != '')?$this->modules[$module]['focus']->$value:''),$text);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
?>
|
||||
87
modules/EcmInsideOrders.cp/ModuleFieldsParser/config.php
Executable file
87
modules/EcmInsideOrders.cp/ModuleFieldsParser/config.php
Executable file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
|
||||
|
||||
$mfp_modules = Array(
|
||||
|
||||
'EcmInsideOrders' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['EcmInsideOrders'],
|
||||
|
||||
'prefix' => 'off_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'EcmDocumentTemplates' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['EcmDocumentTemplates'],
|
||||
|
||||
'prefix' => 'dt_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'Accounts' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['Accounts'],
|
||||
|
||||
'prefix' => 'acc_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'EcmVendors' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['EcmVendors'],
|
||||
|
||||
'prefix' => 'v_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'Contacts' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['Contacts'],
|
||||
|
||||
'prefix' => 'con_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'Users' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['Users'],
|
||||
|
||||
'prefix' => 'us_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
27
modules/EcmInsideOrders.cp/PDFLabelList.php
Executable file
27
modules/EcmInsideOrders.cp/PDFLabelList.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
$PDFLabelList = array (
|
||||
|
||||
'LBL_PDF_LIST_POSITION',
|
||||
'LBL_PDF_LIST_QUANTITY',
|
||||
'LBL_PDF_LIST_UNIT',
|
||||
'LBL_PDF_LIST_DESCRIPTION',
|
||||
'LBL_PDF_LIST_PRICE',
|
||||
'LBL_PDF_LIST_DISCOUNT',
|
||||
'LBL_PDF_LIST_VAT',
|
||||
'LBL_PDF_LIST_TOTAL',
|
||||
'LBL_PDF_TOTAL',
|
||||
'LBL_PDF_DISCOUNT',
|
||||
'LBL_PDF_END_TOTAL',
|
||||
'LBL_PDF_VAT',
|
||||
'LBL_PDF_VATID',
|
||||
'LBL_PDF_NUMBER',
|
||||
'LBL_PDF_DATE_REGISTER',
|
||||
'LBL_PDF_VALIDTILL_DATE',
|
||||
'LBL_PDF_OWNER',
|
||||
'LBL_PDF_DOCUMENT_NAME',
|
||||
'LBL_PDF_CODE',
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
168
modules/EcmInsideOrders.cp/PDFLanguages.php
Executable file
168
modules/EcmInsideOrders.cp/PDFLanguages.php
Executable file
@@ -0,0 +1,168 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $current_user;
|
||||
if(!is_admin($current_user)) {
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
//require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
global $app_list_strings;
|
||||
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
require_once ('include/time.php');
|
||||
|
||||
global $theme;
|
||||
$theme_path = "themes/".$theme."/";
|
||||
$image_path = $theme_path."images/";
|
||||
require_once ($theme_path.'layout_utils.php');
|
||||
|
||||
|
||||
$xtpl = new XTemplate ('modules/EcmInsideOrders/PDFLanguages.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
if (empty($_REQUEST['return_id'])) $xtpl->assign("RETURN_ACTION", 'index');
|
||||
|
||||
|
||||
$PDFLanguagesOptions = array();
|
||||
|
||||
require_once('modules/EcmInsideOrders/PDFLabelList.php');
|
||||
$PDFLL = array();
|
||||
foreach($PDFLabelList as $value) $PDFLL [] = array( 'label' => $value, 'translation' => '');
|
||||
$PDFLanguagesOptions['PDFLabelList'] = $PDFLL;
|
||||
|
||||
$PDFLL = array(
|
||||
'labels' => $PDFLL,
|
||||
'texts' => array(
|
||||
'Contacts' => array(
|
||||
'header_text' => $mod_strings['LBL_DEFAULT_CONTACT_HEADER_TEXT'],
|
||||
'footer_text' => $mod_strings['LBL_DEFAULT_CONTACT_FOOTER_TEXT'],
|
||||
'ads_text' => $mod_strings['LBL_DEFAULT_CONTACT_ADS_TEXT'],
|
||||
),
|
||||
'Accounts' => array(
|
||||
'header_text' => $mod_strings['LBL_DEFAULT_ACCOUNT_HEADER_TEXT'],
|
||||
'footer_text' => $mod_strings['LBL_DEFAULT_ACCOUNT_FOOTER_TEXT'],
|
||||
'ads_text' => $mod_strings['LBL_DEFAULT_ACCOUNT_ADS_TEXT'],
|
||||
),
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
|
||||
$data = EcmText::LoadText(null,null,"EcmInsideOrders",$key);
|
||||
if(isset($data[0]) && isset($data[0]['data'])) $d = $data[0]['data'];
|
||||
else {
|
||||
$d = $PDFLL;
|
||||
if(!isset($d['labels'])) $d['labels'] = $PDFLL['labels'];
|
||||
|
||||
if(!isset($d['texts']['Contacts']['header_text'])) $d['texts']['Contacts']['header_text'] = $mod_strings['LBL_DEFAULT_CONTACT_HEADER_TEXT'];
|
||||
if(!isset($d['texts']['Contacts']['footer_text'])) $d['texts']['Contacts']['footer_text'] = $mod_strings['LBL_DEFAULT_CONTACT_FOOTER_TEXT'];
|
||||
if(!isset($d['texts']['Contacts']['ads_text'])) $d['texts']['Contacts']['ads_text'] = $mod_strings['LBL_DEFAULT_CONTACT_ADS_TEXT'];
|
||||
|
||||
if(!isset($d['texts']['Accounts']['header_text'])) $d['texts']['Accounts']['header_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_HEADER_TEXT'];
|
||||
if(!isset($d['texts']['Accounts']['footer_text'])) $d['texts']['Accounts']['footer_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_FOOTER_TEXT'];
|
||||
if(!isset($d['texts']['Accounts']['ads_text'])) $d['texts']['Accounts']['ads_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_ADS_TEXT'];
|
||||
//print_r($d);
|
||||
}
|
||||
|
||||
|
||||
$tmp2 = array(); foreach($d['labels'] as $k => $v) $tmp2[$v['label']] = $v['translation'];
|
||||
$tmp = array(); $count = 0;
|
||||
foreach($PDFLanguagesOptions['PDFLabelList'] as $k => $v)
|
||||
$tmp[strval($count)] = array('index' => strval($count++), 'label' => $v['label'], 'translation' => $tmp2[$v['label']] );
|
||||
$d['labels'] = $tmp;
|
||||
|
||||
$PDFLanguagesOptions['ecmlanguage'][$key] = $d;
|
||||
|
||||
}
|
||||
|
||||
//$xtpl->assign("PHONE_LIST", EcmInsideOrder::getPhoneList());
|
||||
|
||||
$json = getJSONobj();
|
||||
$scriptOpt = '<script language="javascript">
|
||||
var PDFLanguagesOptions = '.str_replace('"','\"',$json->encode($PDFLanguagesOptions)).'
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
</script>';
|
||||
echo $scriptOpt;
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
$ecminsideorder = new EcmInsideOrder();
|
||||
$xtpl->assign("MFP",$ecminsideorder->loadParserArray());
|
||||
|
||||
$xtpl->assign("ECMLANGUAGES_OPTIONS", get_select_options_with_id($app_list_strings['ecmlanguages_dom'],''));
|
||||
$xtpl->assign("PARENT_OPTIONS", get_select_options_with_id($app_list_strings['ecminsideorders_parent_dom'],''));
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title('EcmInsideOrders', $GLOBALS['mod_strings']['LBL_ECMINSIDEORDERS_PDFLANGUAGES_TITLE'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
require_once('include/javascript/javascript.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('PDFLanguages');
|
||||
// $javascript->addAllFields('');
|
||||
|
||||
//BUILDER:START Pro only
|
||||
// $javascript->addFieldGeneric( 'team_name', 'varchar', $app_strings['LBL_TEAM'] ,'true');
|
||||
// $javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
|
||||
//BUILDER:END Pro only
|
||||
|
||||
// $javascript->addFieldGeneric('central_areacode', 'varchar', $mod_strings['LBL_CENTRAL_AREACODE'] , 'true');
|
||||
// $javascript->addToValidateBinaryDependency('central_areacode', 'alpha' ,$app_strings['ERR_SQS_NO_MATCH_FIELD'].$mod_strings['LBL_CENTRAL_AREACODE'], 'false', '', 'team_id');
|
||||
|
||||
|
||||
// $javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
|
||||
|
||||
echo $javascript->getScript();
|
||||
|
||||
|
||||
?>
|
||||
28
modules/EcmInsideOrders.cp/PDFLanguagesSave.php
Executable file
28
modules/EcmInsideOrders.cp/PDFLanguagesSave.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $current_user;
|
||||
if(!is_admin($current_user)) {
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['ecmlanguage']) && $_REQUEST['ecmlanguage'] != '' && isset($_REQUEST['pdflanguagelist']) && $_REQUEST['pdflanguagelist'] != '') {
|
||||
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
$json = getJSONobj();
|
||||
$pdfll = $json->decode(htmlspecialchars_decode($_REQUEST['pdflanguagelist']));
|
||||
|
||||
global $app_list_strings;
|
||||
foreach($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
if(isset($pdfll[$key]) && count($pdfll[$key]) > 0)
|
||||
EcmText::SaveText(null,null,'EcmInsideOrders',$key,$pdfll[$key]);
|
||||
}
|
||||
|
||||
echo 'Saved';
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
228
modules/EcmInsideOrders.cp/Save.php
Executable file
228
modules/EcmInsideOrders.cp/Save.php
Executable file
@@ -0,0 +1,228 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
$json = getJSONobj();
|
||||
$pll = array(); $i=0; while(isset($_POST['p_'.$i])) { $pll[] = $json->decode(htmlspecialchars_decode($_POST['p_'.$i])); $_POST['p_'.$i] = ''; $i++;}
|
||||
$_POST = $json->decode(htmlspecialchars_decode($_POST['otherFormData']));
|
||||
$_POST['position_list'] = $pll;
|
||||
|
||||
require_once("modules/EcmInsideOrders/EcmInsideOrder.php");
|
||||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['record']) && $_POST['record'] != '') {
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($focus->id) && $focus->id != ''){
|
||||
|
||||
$_POST['email_id'] = $focus->email_id;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
|
||||
ACLController::displayNoAccess(true);
|
||||
|
||||
sugar_cleanup(true);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
if (!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
|
||||
$check_notify = TRUE;
|
||||
|
||||
}else{
|
||||
|
||||
$check_notify = FALSE;
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$check_notify = FALSE;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$wi = $json->decode(htmlspecialchars_decode($_POST['work_items']));
|
||||
|
||||
$focus->work_items = $wi;
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
|
||||
if(isset($_POST[$field])){
|
||||
|
||||
$value = $_POST[$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
|
||||
if(isset($_POST[$field])){
|
||||
|
||||
$value = $_POST[$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['to_is_vat_free']) && $_POST['to_is_vat_free']) $focus->to_is_vat_free = 1; else $focus->to_is_vat_free = 0;
|
||||
|
||||
|
||||
|
||||
$json = getJSONobj();
|
||||
$pl = $_POST['position_list'];
|
||||
|
||||
$focus->position_list = $pl;
|
||||
|
||||
$focus->save($check_notify);
|
||||
|
||||
$return_id = $focus->id;
|
||||
|
||||
$employers=$_POST['employers[]'];
|
||||
|
||||
$employers=$_POST['employers_multi'];
|
||||
|
||||
|
||||
$GLOBALS['db']->query("update ecminsideorders set employers='".$employers."',pw_stock_id='".$_POST['pw_stock_id']."',rw_stock_id='".$_POST['rw_stock_id']."' where id='".$return_id."'");
|
||||
//echo $employers;
|
||||
echo $return_id;
|
||||
|
||||
//header("Location: index.php?module=EcmInsideOrders&action=index");
|
||||
|
||||
//handleRedirect($return_id,'EcmInsideOrders');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
14
modules/EcmInsideOrders.cp/SetStatus.php
Executable file
14
modules/EcmInsideOrders.cp/SetStatus.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
extract($_POST, EXTR_PREFIX_SAME, "wddx");
|
||||
|
||||
global $app_list_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
$arr = EcmInsideOrder::setStatus($record,$status);
|
||||
|
||||
$json = getJSONobj();
|
||||
echo '['.str_replace('"','\"',$json->encode($arr)).']';
|
||||
|
||||
?>
|
||||
42
modules/EcmInsideOrders.cp/StatusAccess.php
Executable file
42
modules/EcmInsideOrders.cp/StatusAccess.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
$status_access = array(
|
||||
'user_manager_role' => array (
|
||||
's10' => true,
|
||||
's20' => false,
|
||||
's30' => true,
|
||||
's40' => true,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
),
|
||||
'user_representative_extra_role' => array (
|
||||
's10' => array('if'=>array('s40')),
|
||||
's20' => false,
|
||||
's30' => true,
|
||||
's40' => false,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
),
|
||||
'user_representative_role' => array (
|
||||
's10' => array('if'=>array('s40')),
|
||||
's20' => array('if'=>array('s10')),
|
||||
's30' => false,
|
||||
's40' => false,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
),
|
||||
'admin' => array(
|
||||
's10' => true,
|
||||
's20' => false,
|
||||
's30' => true,
|
||||
's40' => true,
|
||||
's50' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's60' => array('ifnot'=>array('s10','s20','s40')),
|
||||
's70' => array('ifnot'=>array('s10','s20','s40')),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
41
modules/EcmInsideOrders.cp/deleteProduction.php
Executable file
41
modules/EcmInsideOrders.cp/deleteProduction.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
global $current_user;
|
||||
if ($current_user->id != '1') die('Nie masz uprawnień');
|
||||
|
||||
$codes = explode(",", $_REQUEST['code']);
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
$products = array();
|
||||
foreach ($codes as $code) {
|
||||
//get pw/rw id
|
||||
$doc = $db->fetchByAssoc($db->query("SELECT pw_id, rw_id FROM ecminsideorders WHERE id='$code'"));
|
||||
//delete pw
|
||||
//get codes
|
||||
$prod = $db->query("SELECT code FROM ecmstockdocinsideinitems WHERE ecmstockdocinsidein_id='".$doc['pw_id']."'");
|
||||
while ($p = $db->fetchByAssoc($prod))
|
||||
$products[$p['code']] = true;
|
||||
|
||||
$db->query("DELETE FROM ecmstockdocinsideins WHERE id='".$doc['pw_id']."'");
|
||||
echo 'Error: '.$db->error.'<br>';
|
||||
$db->query("DELETE FROM ecmstockdocinsideinitems WHERE ecmstockdocinsidein_id='".$doc['pw_id']."'");
|
||||
echo 'Error: '.$db->error.'<br>';
|
||||
//delete rw
|
||||
//get code
|
||||
$prod = $db->query("SELECT code FROM ecmstockdocinsideoutitems WHERE ecmstockdocinsideout_id='".$doc['rw_id']."'");
|
||||
while ($p = $db->fetchByAssoc($prod))
|
||||
$products[$p['code']] = true;
|
||||
|
||||
$db->query("DELETE FROM ecmstockdocinsideouts WHERE id='".$doc['rw_id']."'");
|
||||
$db->query("DELETE FROM ecmstockdocinsideoutitems WHERE ecmstockdocinsideout_id='".$doc['rw_id']."'");
|
||||
|
||||
//delete stock operations
|
||||
$db->query("DELETE FROM ecmstockoperations WHERE parent_id IN ('".$doc['pw_id']."','".$doc['rw_id']."')");
|
||||
|
||||
//delete pw/rw id from insideorder
|
||||
$db->query("UPDATE ecminsideorders SET pw_id='', rw_id='' WHERE id='$code'");
|
||||
}
|
||||
|
||||
//create refresh stock link
|
||||
$link = 'index.php?module=EcmStockStates&action=rebuildState&code='.implode(",", array_keys($products));
|
||||
echo '<a href="'.$link.'">'.$link.'</a>';
|
||||
?>
|
||||
96
modules/EcmInsideOrders.cp/downloadOrders.php
Executable file
96
modules/EcmInsideOrders.cp/downloadOrders.php
Executable file
@@ -0,0 +1,96 @@
|
||||
<?
|
||||
include_once("modules/EcmProductReports/vtigerConnector.php");
|
||||
include_once("modules/EcmInsideOrders/EcmInsideOrder.php");
|
||||
mysql_query("delete e,p from ecminsideorders as e inner join ecmproducts_ecminsideorders as p on p.ecminsideorder_id=e.id where e.order_id!='' or e.order_id is not null");
|
||||
function updateOrder($id,$data){
|
||||
$r=mysql_fetch_array(mysql_query("select id from ecminsideorders where order_id='".$id."'"));
|
||||
$iid=$r['id'];
|
||||
$p=new EcmInsideOrder();
|
||||
if($iid){
|
||||
$p->retrieve($iid);
|
||||
}
|
||||
$p->assigned_user_id=1;
|
||||
$p->template_id="97700b0d-fbe9-e366-4016-4b260f058a47";
|
||||
$p->template_name="e5 Polska Sp. z o. o.";
|
||||
$p->name=$data['subject'];
|
||||
$p->status=$data['postatus'];
|
||||
$p->tracking_no=$data['tracking_no'];
|
||||
$p->register_date=$data['duedate'];
|
||||
$p->delivery_date=$data['deliverydate'];
|
||||
$r=mysql_fetch_array(mysql_query("select * from accounts where name like 'e5 Limited'"));
|
||||
$p->parent_id=$r['id'];
|
||||
$p->parent_name=$r['name'];
|
||||
$p->parent_address_street=$r['billing_address_street'];
|
||||
$p->parent_address_city=$r['billing_address_city'];
|
||||
$p->parent_address_postalcode=$r['billing_address_postalcode'];
|
||||
$p->parent_address_country=$r['billing_address_country'];
|
||||
$p->ecmlanguage="pl_pl";
|
||||
$p->currency_id="PLN";
|
||||
$iid=$p->save();
|
||||
mysql_query("update ecminsideorders set tracking_no='".$data['tracking_no']."',order_id='".$id."',delivery_date='".$data['deliverydate']."',register_date='".$data['duedate']."' where id='".$iid."'");
|
||||
}
|
||||
function addLine($data){
|
||||
$ro=mysql_fetch_array(mysql_query("select id from ecminsideorders where order_id='".$data['purchaseorderid']."'"));
|
||||
$rpp=mysql_fetch_array(mysql_query("select max(product_position) as max from ecmproducts_ecminsideorders where ecminsideorder_id='".$ro['id']."'"));
|
||||
$pos=$rpp['max'];
|
||||
$rp=mysql_fetch_array(mysql_query("select id,code,name,carton_volume_meter,pieces_per_carton,moq from ecmproducts where code like '".$data['productcode']."'"));
|
||||
$rv=mysql_fetch_array(mysql_query("select id,name,value from ecmvats where value='0'"));
|
||||
$arr['id']=create_guid();
|
||||
$arr['date_entered']=date("Y-m-d H:i:s");
|
||||
$arr['date_modified']=date("Y-m-d H:i:s");
|
||||
$arr['modified_user_id']=1;
|
||||
$arr['assigned_user_id']=1;
|
||||
$arr['created_by']=1;
|
||||
$arr['deleted']=0;
|
||||
$arr['ecminsideorder_id']=$ro['id'];
|
||||
$arr['ecmproduct_id']=$rp['id'];
|
||||
$arr['product_name']=$rp['name'];
|
||||
$arr['product_code']=$rp['code'];
|
||||
$arr['product_quantity']=$data['quantity'];
|
||||
$arr['product_price']=$data['unit_price'];
|
||||
$arr['product_discount']=0;
|
||||
$arr['product_total']=$data['quantity']*$data['unit_price'];
|
||||
$arr['product_unit_id']=1;
|
||||
$arr['product_unit_name']="szt.";
|
||||
$arr['product_vat_id']=$rv['id'];
|
||||
$arr['product_vat_name']=$rv['name'];
|
||||
$arr['product_vat_value']=$rv['value'];
|
||||
$arr['product_category_id']="";
|
||||
$arr['product_currency_id']="PLN";
|
||||
$arr['product_cbm']=$rp['carton_volume_meter']/$rp['pieces_per_carton'];
|
||||
$arr['product_moq']=$rp['moq'];
|
||||
$arr['product_position']=$pos++;
|
||||
foreach($arr as $k=>$v){
|
||||
$s[]=$k."='".$v."'";
|
||||
}
|
||||
mysql_query("insert into ecmproducts_ecminsideorders set ".implode(",",$s));
|
||||
mysql_query("update ecminsideorders set total=total+".($data['quantity']*$data['unit_price'])." where id='".$ro['id']."'");
|
||||
}
|
||||
$vc=new vtigerConnector();
|
||||
$vc->start=1;
|
||||
$vc->pp=9999999;
|
||||
$vc->limit="0,".$vc->pp;
|
||||
$vc->order_by="purchaseorder.duedate";
|
||||
$vc->sorder="asc";
|
||||
|
||||
$wh[]="purchaseorder.postatus!=''";
|
||||
$wh[]="(purchaseordercf.cf_528!='test')";
|
||||
|
||||
$vc->where=@implode(" and ",$wh);
|
||||
$vc->getData();
|
||||
$cnt=$vc->getCount();
|
||||
$data=$vc->data;
|
||||
//echo '<pre>';
|
||||
//print_r($data);
|
||||
//echo '</pre>';
|
||||
foreach($data as $d){
|
||||
$arr[$d['purchaseorderid']]=$d;
|
||||
}
|
||||
foreach($arr as $k=>$v){
|
||||
updateOrder($k,$v);
|
||||
}
|
||||
foreach($data as $d){
|
||||
addLine($d);
|
||||
}
|
||||
echo "Orders updated: ".count($arr);
|
||||
?>
|
||||
155
modules/EcmInsideOrders.cp/field_arrays.php
Executable file
155
modules/EcmInsideOrders.cp/field_arrays.php
Executable file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$fields_array['EcmInsideOrder'] = array (
|
||||
'column_fields' => Array (
|
||||
'id',
|
||||
'name',
|
||||
'description',
|
||||
'date_entered',
|
||||
'date_modified',
|
||||
'deleted',
|
||||
'modified_user_id',
|
||||
'assigned_user_id',
|
||||
'created_by',
|
||||
|
||||
//NEW COLUMN FIELDS
|
||||
'number',
|
||||
'parent_type',
|
||||
'parent_name',
|
||||
'parent_id',
|
||||
'type',
|
||||
'status',
|
||||
'register_date',
|
||||
'end_date',
|
||||
'parent_address_street',
|
||||
'parent_address_city',
|
||||
'parent_address_postalcode',
|
||||
'parent_address_country',
|
||||
'subtotal',
|
||||
'total',
|
||||
'discount',
|
||||
'to_vatid',
|
||||
'ecmlanguage',
|
||||
'to_is_vat_free',
|
||||
'header_text',
|
||||
'footer_text',
|
||||
'ads_text',
|
||||
'template_id',
|
||||
'template_name',
|
||||
'email_id',
|
||||
'ecmpaymentcondition_id',
|
||||
'ecmpaymentcondition_name',
|
||||
'ecmdeliverycondition_id',
|
||||
'ecmdeliverycondition_name',
|
||||
'validtill_date',
|
||||
'order_origin',
|
||||
'contact_id',
|
||||
'contact_name',
|
||||
'parent_name_copy',
|
||||
'parent_contact_name',
|
||||
'parent_contact_title',
|
||||
'delivery_date',
|
||||
'tracking_no',
|
||||
'pw_stock_id',
|
||||
'rw_stock_id',
|
||||
'employers',
|
||||
),
|
||||
'list_fields' => Array (
|
||||
'number',
|
||||
'document_no',
|
||||
'parent_type',
|
||||
'parent_name',
|
||||
'parent_id',
|
||||
'type',
|
||||
'status',
|
||||
'register_date',
|
||||
'end_date',
|
||||
'parent_address_street',
|
||||
'parent_address_city',
|
||||
'parent_address_postalcode',
|
||||
'parent_address_country',
|
||||
'subtotal',
|
||||
'total',
|
||||
'discount',
|
||||
'to_vatid',
|
||||
'ecmlanguage',
|
||||
'to_is_vat_free',
|
||||
'header_text',
|
||||
'footer_text',
|
||||
'ads_text',
|
||||
'template_id',
|
||||
'template_name',
|
||||
'email_id',
|
||||
'ecmpaymentcondition_id',
|
||||
'ecmpaymentcondition_name',
|
||||
'ecmpaymentcondition_text',
|
||||
'ecmdeliverycondition_id',
|
||||
'ecmdeliverycondition_name',
|
||||
'ecmdeliverycondition_text',
|
||||
'validtill_date',
|
||||
'order_origin',
|
||||
'contact_id',
|
||||
'contact_name',
|
||||
'parent_name_copy',
|
||||
'parent_contact_name',
|
||||
'parent_contact_title',
|
||||
'delivery_date',
|
||||
'tracking_no',
|
||||
'pw_stock_id',
|
||||
'rw_stock_id',
|
||||
'employers',
|
||||
),
|
||||
'required_fields' => array (
|
||||
'number' => 1
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
335
modules/EcmInsideOrders.cp/formloader.php
Executable file
335
modules/EcmInsideOrders.cp/formloader.php
Executable file
@@ -0,0 +1,335 @@
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$module = $_REQUEST['module'];
|
||||
|
||||
$cM = $_REQUEST['createModule'];
|
||||
|
||||
$lA = $_REQUEST['loaderAction'];
|
||||
|
||||
$fN = $_REQUEST['loaderFieldName'];
|
||||
|
||||
$record = $_REQUEST['record'];
|
||||
|
||||
if($lA == "EditView") {
|
||||
|
||||
ob_start();
|
||||
|
||||
$_REQUEST['module'] = $cM;
|
||||
|
||||
$_REQUEST['action'] = "EditView";
|
||||
|
||||
$_REQUEST['record'] = $record;
|
||||
|
||||
$_POST['module'] = $cM;
|
||||
|
||||
$_POST['action'] = "EditView";
|
||||
|
||||
$_POST['record'] = $record;
|
||||
|
||||
$_GET['record'] = $record;
|
||||
|
||||
include('index.php');
|
||||
|
||||
$out = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
echo $out;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($lA == "get_module_fields") {
|
||||
|
||||
global $beanList, $beanFiles;
|
||||
|
||||
$file = 'cache/modules/'.$cM.'/'.$beanList[$cM].'vardefs.php';
|
||||
|
||||
if(file_exists($file)) {
|
||||
|
||||
include($file);
|
||||
|
||||
$dict = $GLOBALS['dictionary'][$beanList[$cM]]['fields'];
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
$file = 'modules/'.$cM.'/vardefs.php';
|
||||
|
||||
if(file_exists($file)) { include($file); $dict = $dictionary[$beanList[$cM]]['fields']; } else return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$file = $beanFiles[$beanList[$cM]];
|
||||
|
||||
if(file_exists($file)) {
|
||||
|
||||
require_once($file);
|
||||
|
||||
$bean = new $beanList[$cM]();
|
||||
|
||||
$bean->retrieve($record);
|
||||
|
||||
if(isset($bean->id) && $bean->id != '') {
|
||||
|
||||
$arr = array();
|
||||
|
||||
foreach($dict as $key => $value) {
|
||||
|
||||
if(isset($bean->$value['name']) && (is_string($bean->$value['name']) || is_float($bean->$value['name']) || is_int($bean->$value['name']) || is_bool($bean->$value['name'])))
|
||||
|
||||
$arr[$value['name']] = $bean->$value['name'];
|
||||
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
echo '['.str_replace('"','\"',$json->encode($arr)).']';
|
||||
|
||||
} else return;
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
|
||||
|
||||
<title></title>
|
||||
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp1_yui.js?s=5.0.0c&c="></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="hidder" style="position:absolute;left:0;top:0;width:105%;height:100%;background-color:white;visibility:visible;text-align:center;padding:40px;"><img src="themes/default/images/loading.gif"/></div>
|
||||
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
|
||||
|
||||
function doRequest(where,post,success,error) {
|
||||
|
||||
this.Display = function(result) { success(result.responseText); }
|
||||
|
||||
this.Fail = function(result){ if(error) error(result); }
|
||||
|
||||
YAHOO.util.Connect.asyncRequest('POST',where,{success:this.Display,failure:this.Fail},post);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function iframeLoad() {
|
||||
|
||||
var frame = document.getElementById("input_create");
|
||||
|
||||
|
||||
var doc = frame.contentDocument;
|
||||
|
||||
if(typeof(doc) == "undefined" || !doc)
|
||||
|
||||
doc = frame.contentWindow.document;
|
||||
|
||||
//alert(doc.forms.DetailView);
|
||||
|
||||
|
||||
|
||||
if(doc && doc.forms && ((doc.forms.EditView || doc.forms.DetailView || doc.forms.Save) || doc.return_module_fields)) {
|
||||
|
||||
|
||||
|
||||
if(doc.forms.EditView) {
|
||||
|
||||
|
||||
|
||||
} else
|
||||
|
||||
if(doc.forms.DetailView) {
|
||||
|
||||
var record = doc.forms.DetailView.record;
|
||||
|
||||
if(record && record.value != "") {
|
||||
|
||||
doRequest(
|
||||
|
||||
"index.php",
|
||||
|
||||
"module="+module+"&action=formloader&loaderAction=get_module_fields&createModule="+cM+"&to_pdf=1&record="+record.value,
|
||||
|
||||
function(result) {
|
||||
|
||||
if(result == '')
|
||||
|
||||
window.close();
|
||||
|
||||
else {
|
||||
|
||||
var obj = eval(result);
|
||||
|
||||
if(obj) {
|
||||
obj = obj[0];
|
||||
|
||||
eval('window.opener.'+fN+'.responseData(obj)');
|
||||
//alert(window.parent);
|
||||
|
||||
}
|
||||
|
||||
window.close();
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
function(result) {
|
||||
|
||||
window.close();
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
} else window.close();
|
||||
|
||||
} else
|
||||
|
||||
if(doc.forms.Save) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else { window.close(); return; }
|
||||
|
||||
|
||||
|
||||
var main = doc.getElementById('main');
|
||||
|
||||
if(main) {
|
||||
|
||||
var dd = doc.createElement('div');
|
||||
dd.innerHTML = '<table style="width:100%;"><tr id="main2"></tr></table>';
|
||||
|
||||
doc.body.insertBefore(dd,doc.body.firstChild);
|
||||
|
||||
doc.getElementById('main2').appendChild(main);
|
||||
|
||||
main.style.position = 'absolute';
|
||||
main.style.left = 0;
|
||||
main.style.top = 0;
|
||||
for(var i=1; i<doc.body.childNodes.length; i++) if(doc.body.childNodes[i] !== main && doc.body.childNodes[i].style) {
|
||||
doc.body.childNodes[i].style.visibility = 'hidden';
|
||||
}
|
||||
if(doc && doc.forms && !doc.forms.DetailView) doc.body.FormLoader = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var oldLocation = '';
|
||||
|
||||
setInterval(function(){
|
||||
|
||||
var frame = document.getElementById("input_create");
|
||||
|
||||
if(frame) {
|
||||
|
||||
var doc = frame.contentDocument;
|
||||
|
||||
if(doc == undefined || doc == null)
|
||||
|
||||
doc = frame.contentWindow.document;
|
||||
|
||||
|
||||
|
||||
if(doc && doc.body && doc.body.FormLoader) {
|
||||
|
||||
if(hidder.style.visibility = "visible") hidder.style.visibility = "hidden";
|
||||
|
||||
} else {
|
||||
|
||||
if(hidder.style.visibility = "hidden") hidder.style.visibility = "visible"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},60);
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if($lA == "ViewForm") {
|
||||
|
||||
echo '<script language="javascript">
|
||||
|
||||
var module = "'.$module.'";
|
||||
|
||||
var cM = "'.$cM.'";
|
||||
|
||||
var lA = "'.$lA.'";
|
||||
|
||||
var fN = "'.$fN.'";
|
||||
|
||||
</script>';
|
||||
|
||||
$data = '';
|
||||
|
||||
foreach($_REQUEST as $key=>$value) {
|
||||
|
||||
if(strpos($key,"fl_") === 0) {
|
||||
|
||||
$data .= "&".substr($key,3)."=".$value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "<iframe onload='iframeLoad();' frameborder='no' width='100%' height='100%' id='input_create' name='input_create' src='index.php?module=$module&action=formloader&to_pdf=1&loaderAction=EditView&createModule=$cM".$data."'></iframe>";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
84
modules/EcmInsideOrders.cp/generateNumber.php
Executable file
84
modules/EcmInsideOrders.cp/generateNumber.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
if(isset($_REQUEST['generate']) && $_REQUEST['generate'] == '1') {
|
||||
|
||||
try {
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') $focus->retrieve($_REQUEST['record']);
|
||||
$focus->template_id = $_REQUEST['template_id'];
|
||||
$focus->type = $_REQUEST['type'];
|
||||
$focus->setTemplate();
|
||||
$arr = array();
|
||||
$arr['number'] = (isset($focus->id) && $focus->id != '') ? $focus->number : $focus->generateNumber();
|
||||
$arr['document_no'] = $focus->formatNumber();
|
||||
}
|
||||
catch (Exception $e) { echo ''; return; }
|
||||
|
||||
$json = getJSONobj();
|
||||
echo '['.$json->encode($arr).']';
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
<?
|
||||
$r=mysql_fetch_array(mysql_query("select * from ecmdocumenttemplates where id='".$_GET['template_id']."'"));
|
||||
//print mysql_error();
|
||||
$per=$r['documents_per'];
|
||||
$format=$r['document_number_format_id'];
|
||||
$date=$timedate->to_display($_GET['date'], $timedate->get_date_format(), "Y-m-d");
|
||||
$exp=explode("-",$date);
|
||||
if($per=="day")$daten=$date;
|
||||
if($per=="month")$daten=$exp[0]."-".$exp[1];
|
||||
if($per=="year")$daten=$exp[0];
|
||||
$r=mysql_fetch_array(mysql_query("select number from ".$_GET['table']." where ".$_GET['date_field']." like '".$daten."%' order by number desc limit 1"));
|
||||
$no=$r['number']+1;
|
||||
//$number=$_GET['prefix']."/".$no."/".$exp[1]."/".$exp[0];
|
||||
if($format[1]=="/")$sep="/";
|
||||
elseif($format[1]==".")$sep=".";
|
||||
elseif($format[1]=="-")$sep="-";
|
||||
else $sep="";
|
||||
|
||||
if($per=="month")
|
||||
{
|
||||
$format=str_replace("D "," ",$format);
|
||||
$format=str_replace("D-","",$format);
|
||||
$format=str_replace("D/","",$format);
|
||||
$format=str_replace("D.","",$format);
|
||||
}
|
||||
if($per=="year")
|
||||
{
|
||||
$format=str_replace("D "," ",$format);
|
||||
$format=str_replace("D-","",$format);
|
||||
$format=str_replace("M-","",$format);
|
||||
$format=str_replace("D/","",$format);
|
||||
$format=str_replace("M/","",$format);
|
||||
$format=str_replace("D.","",$format);
|
||||
$format=str_replace("M.","",$format);
|
||||
}
|
||||
$format=str_replace("Y",$exp[0],$format);
|
||||
$format=str_replace("M",$exp[1],$format);
|
||||
$format=str_replace("D",$exp[2],$format);
|
||||
$format=str_replace("NR",$no,$format);
|
||||
|
||||
$number=$_GET['prefix'].$sep.$format;
|
||||
if($_GET['show_number'])print $number;
|
||||
else print $no;
|
||||
?>
|
||||
|
||||
if(!$_REQUEST['record'])
|
||||
{
|
||||
$generate_number='mintajaxget("index.php?to_pdf=1&module=EcmStocks&action=generateNumber&date="+document.getElementById("jscal_fielddue_date").value+"&table=ecminsideorders&date_field=due_date&prefix=PO&show_number=1&template_id="+document.getElementById("template_id").value,"name");mintajaxget("index.php?to_pdf=1&module=EcmStocks&action=generateNumber&date="+document.getElementById("jscal_fielddue_date").value+"&table=ecminsideorders&date_field=due_date&prefix=PO&show_number=0&template_id="+document.getElementById("template_id").value,"number");';
|
||||
$xtpl->assign("GENERATE_NUMBER",'<script language="javascript">'.$generate_number.'</script>');
|
||||
$xtpl->assign("GENERATE_NUMBER_DATE",'onchange=\''.$generate_number.'\'');
|
||||
$gen='onchange=\''.$generate_number.'\'';
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
|
||||
66
modules/EcmInsideOrders.cp/getData.php
Executable file
66
modules/EcmInsideOrders.cp/getData.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
//get formatted name and email from account by id
|
||||
function getFormattedEmailFromAccounById($id) {
|
||||
if(!isset($id) || $id == '') return false;
|
||||
require_once('modules/Accounts/Account.php');
|
||||
$acc = new Account();
|
||||
$acc->retrieve($id);
|
||||
if(isset($acc->id) && $acc->id != '') {
|
||||
return $acc->name.' <'.$acc->email1.'>; ';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
//get formatted name and email from user
|
||||
function getFormattedEmailFromUserId($id) {
|
||||
if(!isset($id) || $id == '') return false;
|
||||
require_once('modules/Users/User.php');
|
||||
$us = new User();
|
||||
$us->retrieve($id);
|
||||
if(isset($us->id) && $us->id != '') {
|
||||
return $us->full_name.' <'.$us->email1.'>; ';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
//get info from module by Id
|
||||
function getInfoFromModuleById($module, $id, $arr = '') {
|
||||
if(!isset($id) || $id == '') return false;
|
||||
global $beanFiles, $beanList;
|
||||
require_once($beanFiles[$beanList[$module]]);
|
||||
$bean = new $beanList[$module]();
|
||||
$bean->retrieve($id);
|
||||
if(isset($bean->id) && $bean->id != '') {
|
||||
$arr = explode('|', $arr);
|
||||
$tmp = array();
|
||||
for($i=0; $i<count($arr); $i++)
|
||||
$tmp[$arr[$i]] = $bean->$arr[$i];
|
||||
$json = getJSONobj();
|
||||
return '['.$json->encode($tmp).']';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['data']) && $_REQUEST['data'] == 'EFA' && isset($_REQUEST['id']) && $_REQUEST['id'] != '')
|
||||
|
||||
echo getFormattedEmailFromAccounById($_REQUEST['id']);
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['data']) && $_REQUEST['data'] == 'EFAUID' && isset($_REQUEST['id']) && $_REQUEST['id'] != '')
|
||||
|
||||
echo getFormattedEmailFromUserId($_REQUEST['id']);
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['gdData']) && $_REQUEST['gdData'] != '' && isset($_REQUEST['gdId']) && $_REQUEST['gdId'] != '' && isset($_REQUEST['gdData']) && $_REQUEST['gdData'] != '')
|
||||
|
||||
echo getInfoFromModuleById($_REQUEST['gdModule'],$_REQUEST['gdId'],$_REQUEST['gdData']);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
6
modules/EcmInsideOrders.cp/index.php
Executable file
6
modules/EcmInsideOrders.cp/index.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
require_once('modules/EcmInsideOrders/ListView.php');
|
||||
|
||||
?>
|
||||
472
modules/EcmInsideOrders.cp/language/en_us.lang.php
Executable file
472
modules/EcmInsideOrders.cp/language/en_us.lang.php
Executable file
@@ -0,0 +1,472 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_TYPE' =>'Type',
|
||||
'LBL_END_DATE'=>'End date',
|
||||
'LBL_PW_STOCK_NAME'=>'PW Document Inventory',
|
||||
'LBL_RW_STOCK_NAME'=>'RW Document Inventory',
|
||||
'LBL_EMPLOYERS'=>'Employers',
|
||||
'LBL_RW_STOCK_ID'=>'RW Document Inventory',
|
||||
'LBL_PW_STOCK_ID'=>'PW Document Inventory',
|
||||
//added 18.06.2010
|
||||
'LBL_TRACKING_NO'=>"Tracking No",
|
||||
//added 25.05.2010
|
||||
'LBL_DELIVERY_DATE'=>'Delivery Date',
|
||||
//added 24.11.2009
|
||||
'LBL_EDITTABLE_MOQ'=>'MOQ',
|
||||
//added 27.08.2009
|
||||
'LBL_EDITTABLE_UNIT'=>'Unit',
|
||||
//added 25.08.2009
|
||||
'LBL_CURRENCY'=>'Currency',
|
||||
//added 16.02.2009
|
||||
'LBL_CREATE_PZ_BUTTON' => 'Create PZ',
|
||||
//added 13.02.2009
|
||||
'LBL_ECMSTOCKDOCOUTS_SUBPANEL_TITLE'=>'WZ Documents',
|
||||
'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE'=>'Invoices',
|
||||
'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE'=>'Delivery Notes',
|
||||
//added 12.02.2009
|
||||
'LBL_CREATE_PZ'=>'Create PZ',
|
||||
'LBL_CREATE_PZ_BUTTON_TITLE'=>'Create PZ',
|
||||
'LBL_ECMSTOCKDOCINS_SUBPANEL_TITLE'=>'PZ Documents',
|
||||
//added 22.01.2009
|
||||
'LBL_ECMINSIDEORDERS_SUBPANEL_TITLE' => 'Inside Orders',
|
||||
//added 20.01.2009
|
||||
'LBL_SEND_EMAIL_BUTTON_TITLE' => 'Send Email',
|
||||
'LBL_SEND_EMAIL' => 'Send Email',
|
||||
//added 07.01.2009
|
||||
'LBL_LIST_MY_ECMINSIDEORDERS' => 'My Assigned Inside Orders',
|
||||
// added 20.12.2008
|
||||
'LBL_EDITTABLE_CBM' => 'CBM',
|
||||
'LBL_CBM_TOTAL' => 'CBM Total',
|
||||
'LBL_CURRENCY' => 'Currency',
|
||||
|
||||
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Inside Orders',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Inside Orders: Home',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmInsideOrders',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Inside Orders Search',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Inside Orders List',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'New Inside Order',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS' => 'Inside Order details:',
|
||||
|
||||
'LBL_ITEMS' => 'Items included:',
|
||||
|
||||
'LBL_TEXTS' => 'Texts to PDF:',
|
||||
|
||||
'LBL_PREVIEW' => 'Preview PDF:',
|
||||
|
||||
'LBL_EMAIL' => 'Create Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'To Informations:',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Details',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Items',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Texts',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Preview',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Name',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
|
||||
'LBL_MODIFIED' => 'Last Modified',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To',
|
||||
|
||||
'LBL_CREATED' => 'Created by',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned To',
|
||||
|
||||
'LBL_DELETED_BY' => 'Deleted by',
|
||||
|
||||
'LBL_NUMBER' => 'Number',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Number',
|
||||
|
||||
'LBL_PARENT' => 'To',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Account',
|
||||
|
||||
'LBL_PARENT_ID' => 'Account Id',
|
||||
|
||||
'LBL_TYPE' => 'Type',
|
||||
|
||||
'LBL_ECMINSIDEORDER_ID' => 'Inside Order Id',
|
||||
|
||||
'LBL_ECMINSIDEORDER_NAME' => 'Inside Order Name',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Document Date',
|
||||
|
||||
'LBL_SELL_DATE' => 'Sell Date',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Payment Date',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Street',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Postalcode / City',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Postalcode',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Country',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Is VAT Free?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Ads Text',
|
||||
|
||||
|
||||
|
||||
'LBL_SUBTOTAL' => 'Subtotal',
|
||||
|
||||
'LBL_TOTAL' => 'Total',
|
||||
|
||||
'LBL_DISCOUNT' => 'Discount',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Accepted',
|
||||
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Template Id',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Template',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Payment Condition',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Payment Condition ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Delivery Condition',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Delivery Condition ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Format Number Error!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'There are some errors on items list or in form!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Discount Format Number Error',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Code',
|
||||
'LBL_EDITTABLE_NAME' => 'Name',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Quant',
|
||||
'LBL_EDITTABLE_PRICE' => 'Price',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Discount',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Total',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opt',
|
||||
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'Move Up',
|
||||
'LBL_MOVE_ROW_DOWN' => 'Move Down',
|
||||
'LBL_INSERT_NEW_ROW' => 'Insert new row',
|
||||
'LBL_DELETE_ROW' => 'Delete row',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Valid Till',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMINSIDEORDER' => 'Create Inside Order',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_LIST' => 'Inside Orders List',
|
||||
|
||||
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Search',
|
||||
|
||||
'LBL_IMG_NEW' => 'New, add to base',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edit',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Would you like to confirm this Inside Order?',
|
||||
|
||||
'LBL_ECMINSIDEORDER_PDF' => 'Show PDF',
|
||||
'LBL_ECMINSIDEORDER_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_ECMINSIDEORDER_PDF_BUTTON_TITLE' => 'Show Inside Order in PDF file.',
|
||||
|
||||
'LBL_ECMINSIDEORDER_TO_INVOICE' => 'Create Invoice',
|
||||
'LBL_ECMINSIDEORDER_TO_INVOICE_BUTTON_KEY' => 'Create Invoice [Alt+I]',
|
||||
'LBL_ECMINSIDEORDER_TO_INVOICE_BUTTON_TITLE' => 'Create Invoice.',
|
||||
|
||||
'LBL_ECMINSIDEORDER_TO_SALE' => 'Create Sales Order',
|
||||
'LBL_ECMINSIDEORDER_TO_SALE_BUTTON_KEY' => 'Create Sales Order [Alt+O]',
|
||||
'LBL_ECMINSIDEORDER_TO_SALE_BUTTON_TITLE' => 'Create Sales Order.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Send To Confirm [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Send This Inside Order To Confirm.',
|
||||
|
||||
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Create Invoice.',
|
||||
'LBL_LIST_TO_SALE' => 'Create Sales Order.',
|
||||
|
||||
|
||||
//buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Save & Send [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Save & Send',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Repair [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Repair',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Accept [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Accept',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Reject [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Reject',
|
||||
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Go to ecminsideorders list [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Go to list',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Send Email',
|
||||
|
||||
|
||||
'LBL_NOT_SAVED' => 'Inside Order not saved. Please check all fields are correct!',
|
||||
|
||||
'LBL_SAVED' => 'Inside Order saved successfully.',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => 'Zamówienie dla $account_name.',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ECMVENDOR_HEADER_TEXT' => 'Zamówienie dla $ecmvendor_name.',
|
||||
|
||||
'LBL_DEFAULT_ECMVENDOR_FOOTER_TEXT' => 'Tekst pod tabelka dla Vendora',
|
||||
|
||||
'LBL_DEFAULT_ECMVENDOR_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Vendora',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notes',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emails',
|
||||
|
||||
|
||||
|
||||
'LBL_DASHLET_MY_ECMINSIDEORDERS' => 'Inside Orders',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_PDF_LIST_POSITION' => 'Poz.',
|
||||
'LBL_PDF_LIST_QUANTITY' => 'Ilość',
|
||||
'LBL_PDF_LIST_UNIT' => '',
|
||||
'LBL_PDF_LIST_DESCRIPTION' => 'Opis',
|
||||
'LBL_PDF_LIST_CODE' => 'Index',
|
||||
'LBL_PDF_LIST_PRICE' => 'Cena',
|
||||
'LBL_PDF_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_LIST_VAT' => 'VAT',
|
||||
'LBL_PDF_LIST_TOTAL' => 'Suma',
|
||||
'LBL_PDF_TOTAL' => 'Suma',
|
||||
'LBL_PDF_DISCOUNT' => 'RABAT',
|
||||
'LBL_PDF_END_TOTAL' => 'Suma końcowa',
|
||||
'LBL_PDF_VAT' => 'VAT',
|
||||
'LBL_PDF_VATID' => 'VAT-ID',
|
||||
'LBL_PDF_NUMBER' => 'Numer',
|
||||
'LBL_PDF_DATE_REGISTER' => 'Data wystawienia',
|
||||
'LBL_PDF_VALIDTILL_DATE' => 'Ważność zamówienia',
|
||||
'LBL_PDF_OWNER' => 'Wystawil',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Zamówienie Wewnętrzne',
|
||||
'LBL_PDF_FILENAME' => 'Inside_Order_',
|
||||
'LBL_PDF_CODE' => 'WO',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMINSIDEORDERS_PDFLANGUAGES_TITLE' => 'PDF Languages Settings',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Inside Order is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Inside Order to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Inside Order status is set.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Now Inside Order is waiting for confimations.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Inside Order is confirmed.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Inside Order status is set.",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Sending Inside Order to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplicate',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Preview Inside Order',
|
||||
'LBL_LIST_REJECT' => 'Reject',
|
||||
'LBL_LIST_ACCEPT' => 'Accept',
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Modified By',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Order Origin',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Preview',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Close',
|
||||
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Contact',
|
||||
'LBL_CONTACT_ID' => 'Contact Id',
|
||||
'LBL_PARENT_NAME_COPY' => 'Company Name',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Contact Person',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Contact Title',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Would you like to load default texts correspondencing to this language?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Download PDF',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
422
modules/EcmInsideOrders.cp/language/ge_ge.lang.php
Executable file
422
modules/EcmInsideOrders.cp/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,422 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
|
||||
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Quotes',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Quotes: Home',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmInsideOrders',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Quotes Search',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Quotes List',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'New Quote',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS' => 'Quote details:',
|
||||
|
||||
'LBL_ITEMS' => 'Items included:',
|
||||
|
||||
'LBL_TEXTS' => 'Texts to PDF:',
|
||||
|
||||
'LBL_PREVIEW' => 'Preview PDF:',
|
||||
|
||||
'LBL_EMAIL' => 'Create Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'To Informations:',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Details',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Items',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Texts',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Preview',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Name',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
|
||||
'LBL_MODIFIED' => 'Last Modified',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To',
|
||||
|
||||
'LBL_CREATED' => 'Created by',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned To',
|
||||
|
||||
'LBL_DELETED_BY' => 'Deleted by',
|
||||
|
||||
'LBL_NUMBER' => 'Number',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Number',
|
||||
|
||||
'LBL_PARENT' => 'To',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Account',
|
||||
|
||||
'LBL_PARENT_ID' => 'Account Id',
|
||||
|
||||
'LBL_TYPE' => 'Type',
|
||||
|
||||
'LBL_ECMINSIDEORDER_ID' => 'Quote Id',
|
||||
|
||||
'LBL_ECMINSIDEORDER_NAME' => 'Quote Name',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Document Date',
|
||||
|
||||
'LBL_SELL_DATE' => 'Sell Date',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Payment Date',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Street',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Postalcode / City',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Postalcode',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Country',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Is VAT Free?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Ads Text',
|
||||
|
||||
|
||||
|
||||
'LBL_SUBTOTAL' => 'Subtotal',
|
||||
|
||||
'LBL_TOTAL' => 'Total',
|
||||
|
||||
'LBL_DISCOUNT' => 'Discount',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Accepted',
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Template Id',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Template',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Payment Condition',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Payment Condition ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Delivery Condition',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Delivery Condition ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Format Number Error!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'There are some errors on items list or in form!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Discount Format Number Error',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Code',
|
||||
'LBL_EDITTABLE_NAME' => 'Name',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Quant',
|
||||
'LBL_EDITTABLE_PRICE' => 'Price',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Discount',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Total',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opt',
|
||||
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'Move Up',
|
||||
'LBL_MOVE_ROW_DOWN' => 'Move Down',
|
||||
'LBL_INSERT_NEW_ROW' => 'Insert new row',
|
||||
'LBL_DELETE_ROW' => 'Delete row',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Valid Till',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMINSIDEORDER' => 'Create Quote',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_LIST' => 'Quotes List',
|
||||
|
||||
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Search',
|
||||
|
||||
'LBL_IMG_NEW' => 'New, add to base',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edit',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Would you like to confirm this Quote?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Show PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Show Quote in PDF file.',
|
||||
|
||||
'LBL_QUOTE_TO_INVOICE' => 'Create Invoice',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_KEY' => 'Create Invoice [Alt+I]',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_TITLE' => 'Create Invoice.',
|
||||
|
||||
'LBL_QUOTE_TO_SALE' => 'Create Sales Order',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Create Sales Order [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Create Sales Order.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Send To Confirm [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Send This Quote To Confirm.',
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Create Invoice.',
|
||||
'LBL_LIST_TO_SALE' => 'Create Sales Order.',
|
||||
|
||||
|
||||
|
||||
//buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Save & Send [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Save & Send',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Repair [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Repair',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Accept [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Accept',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Reject [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Reject',
|
||||
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Go to quotes list [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Go to list',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Send Email',
|
||||
|
||||
'LBL_NOT_SAVED' => 'Quote not saved. Please check all fields are correct!',
|
||||
|
||||
'LBL_SAVED' => 'Quote saved successfully.',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => 'Oferta dla $account_name.',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notes',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emails',
|
||||
|
||||
|
||||
|
||||
'LBL_DASHLET_MY_ECMINSIDEORDERS' => 'Quotes',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_PDF_LIST_POSITION' => 'Poz.',
|
||||
'LBL_PDF_LIST_QUANTITY' => 'Ilosc',
|
||||
'LBL_PDF_LIST_UNIT' => '',
|
||||
'LBL_PDF_LIST_DESCRIPTION' => 'Opis',
|
||||
'LBL_PDF_LIST_PRICE' => 'Cena',
|
||||
'LBL_PDF_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_LIST_VAT' => 'VAT',
|
||||
'LBL_PDF_LIST_TOTAL' => 'Suma',
|
||||
'LBL_PDF_TOTAL' => 'Suma',
|
||||
'LBL_PDF_DISCOUNT' => 'RABAT',
|
||||
'LBL_PDF_END_TOTAL' => 'Suma koncowa',
|
||||
'LBL_PDF_VAT' => 'VAT',
|
||||
'LBL_PDF_VATID' => 'VAT-ID',
|
||||
'LBL_PDF_NUMBER' => 'Numer',
|
||||
'LBL_PDF_DATE_REGISTER' => 'Data wystawienia',
|
||||
'LBL_PDF_VALIDTILL_DATE' => 'Waznosc oferty',
|
||||
'LBL_PDF_OWNER' => 'Wystawil',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Oferta',
|
||||
'LBL_PDF_FILENAME' => 'Quote_',
|
||||
'LBL_PDF_CODE' => '',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMINSIDEORDERS_PDFLANGUAGES_TITLE' => 'PDF Languages Settings',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Quote is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Quote to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Quote status is set.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Now Quote is waiting for confimations.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Quote is confirmed.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Quote status is set.",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Sending Quote to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplicate',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Preview Quote',
|
||||
'LBL_LIST_REJECT' => 'Reject',
|
||||
'LBL_LIST_ACCEPT' => 'Accept',
|
||||
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Modified By',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Order Origin',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Preview',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Close',
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Contact',
|
||||
'LBL_CONTACT_ID' => 'Contact Id',
|
||||
'LBL_PARENT_NAME_COPY' => 'Company Name',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Contact Person',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Contact Title',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Would you like to load default texts correspondencing to this language?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Download PDF',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
454
modules/EcmInsideOrders.cp/language/nl_NL.lang.php
Executable file
454
modules/EcmInsideOrders.cp/language/nl_NL.lang.php
Executable file
@@ -0,0 +1,454 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
//added 16.02.2009
|
||||
'LBL_CREATE_PZ_BUTTON' => 'Create PZ',
|
||||
//added 13.02.2009
|
||||
'LBL_ECMSTOCKDOCOUTS_SUBPANEL_TITLE'=>'WZ Documents',
|
||||
'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE'=>'Invoices',
|
||||
'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE'=>'Delivery Notes',
|
||||
//added 12.02.2009
|
||||
'LBL_CREATE_PZ'=>'Create PZ',
|
||||
'LBL_CREATE_PZ_BUTTON_TITLE'=>'Create PZ',
|
||||
'LBL_ECMSTOCKDOCINS_SUBPANEL_TITLE'=>'PZ Documents',
|
||||
//added 22.01.2009
|
||||
'LBL_ECMINSIDEORDERS_SUBPANEL_TITLE' => 'Purchase Orders',
|
||||
//added 20.01.2009
|
||||
'LBL_SEND_EMAIL_BUTTON_TITLE' => 'Send Email',
|
||||
'LBL_SEND_EMAIL' => 'Send Email',
|
||||
//added 07.01.2009
|
||||
'LBL_LIST_MY_ECMINSIDEORDERS' => 'My Assigned Purchase Orders',
|
||||
// added 20.12.2008
|
||||
'LBL_EDITTABLE_CBM' => 'CBM',
|
||||
'LBL_CBM_TOTAL' => 'CBM Total',
|
||||
'LBL_CURRENCY' => 'Currency',
|
||||
|
||||
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Purchase Orders',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Purchase Orders: Home',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmInsideOrders',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Purchase Orders Search',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Purchase Orders List',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'New Purchase Order',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS' => 'Purchase Order details:',
|
||||
|
||||
'LBL_ITEMS' => 'Items included:',
|
||||
|
||||
'LBL_TEXTS' => 'Texts to PDF:',
|
||||
|
||||
'LBL_PREVIEW' => 'Preview PDF:',
|
||||
|
||||
'LBL_EMAIL' => 'Create Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'To Informations:',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Details',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Items',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Texts',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Preview',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Name',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
|
||||
'LBL_MODIFIED' => 'Last Modified',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To',
|
||||
|
||||
'LBL_CREATED' => 'Created by',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned To',
|
||||
|
||||
'LBL_DELETED_BY' => 'Deleted by',
|
||||
|
||||
'LBL_NUMBER' => 'Number',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Number',
|
||||
|
||||
'LBL_PARENT' => 'To',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Vendor',
|
||||
|
||||
'LBL_PARENT_ID' => 'Vendor Id',
|
||||
|
||||
'LBL_TYPE' => 'Type',
|
||||
|
||||
'LBL_ECMINSIDEORDER_ID' => 'Purchase Order Id',
|
||||
|
||||
'LBL_ECMINSIDEORDER_NAME' => 'Purchase Order Name',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Document Date',
|
||||
|
||||
'LBL_SELL_DATE' => 'Sell Date',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Payment Date',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Street',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Postalcode / City',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Postalcode',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Country',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Is VAT Free?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Ads Text',
|
||||
|
||||
|
||||
|
||||
'LBL_SUBTOTAL' => 'Subtotal',
|
||||
|
||||
'LBL_TOTAL' => 'Total',
|
||||
|
||||
'LBL_DISCOUNT' => 'Discount',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Accepted',
|
||||
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Template Id',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Template',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Payment Condition',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Payment Condition ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Delivery Condition',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Delivery Condition ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Format Number Error!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'There are some errors on items list or in form!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Discount Format Number Error',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Code',
|
||||
'LBL_EDITTABLE_NAME' => 'Name',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Quant',
|
||||
'LBL_EDITTABLE_PRICE' => 'Price',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Discount',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Total',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opt',
|
||||
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'Move Up',
|
||||
'LBL_MOVE_ROW_DOWN' => 'Move Down',
|
||||
'LBL_INSERT_NEW_ROW' => 'Insert new row',
|
||||
'LBL_DELETE_ROW' => 'Delete row',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Valid Till',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMINSIDEORDER' => 'Create Purchase Order',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_LIST' => 'Purchase Orders List',
|
||||
|
||||
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Search',
|
||||
|
||||
'LBL_IMG_NEW' => 'New, add to base',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edit',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Would you like to confirm this Purchase Order?',
|
||||
|
||||
'LBL_ECMINSIDEORDER_PDF' => 'Show PDF',
|
||||
'LBL_ECMINSIDEORDER_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_ECMINSIDEORDER_PDF_BUTTON_TITLE' => 'Show Purchase Order in PDF file.',
|
||||
|
||||
'LBL_ECMINSIDEORDER_TO_INVOICE' => 'Create Invoice',
|
||||
'LBL_ECMINSIDEORDER_TO_INVOICE_BUTTON_KEY' => 'Create Invoice [Alt+I]',
|
||||
'LBL_ECMINSIDEORDER_TO_INVOICE_BUTTON_TITLE' => 'Create Invoice.',
|
||||
|
||||
'LBL_ECMINSIDEORDER_TO_SALE' => 'Create Sales Order',
|
||||
'LBL_ECMINSIDEORDER_TO_SALE_BUTTON_KEY' => 'Create Sales Order [Alt+O]',
|
||||
'LBL_ECMINSIDEORDER_TO_SALE_BUTTON_TITLE' => 'Create Sales Order.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Send To Confirm [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Send This Purchase Order To Confirm.',
|
||||
|
||||
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Create Invoice.',
|
||||
'LBL_LIST_TO_SALE' => 'Create Sales Order.',
|
||||
|
||||
|
||||
//buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Save & Send [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Save & Send',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Repair [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Repair',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Accept [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Accept',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Reject [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Reject',
|
||||
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Go to ecminsideorders list [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Go to list',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Send Email',
|
||||
|
||||
|
||||
'LBL_NOT_SAVED' => 'Purchase Order not saved. Please check all fields are correct!',
|
||||
|
||||
'LBL_SAVED' => 'Purchase Order saved successfully.',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => 'Zam<61>wienie dla $account_name.',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ECMVENDOR_HEADER_TEXT' => 'Zam<61>wienie dla $ecmvendor_name.',
|
||||
|
||||
'LBL_DEFAULT_ECMVENDOR_FOOTER_TEXT' => 'Tekst pod tabelka dla Vendora',
|
||||
|
||||
'LBL_DEFAULT_ECMVENDOR_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Vendora',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notes',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emails',
|
||||
|
||||
|
||||
|
||||
'LBL_DASHLET_MY_ECMINSIDEORDERS' => 'Purchase Orders',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_PDF_LIST_POSITION' => 'Poz.',
|
||||
'LBL_PDF_LIST_QUANTITY' => 'Ilosc',
|
||||
'LBL_PDF_LIST_UNIT' => '',
|
||||
'LBL_PDF_LIST_DESCRIPTION' => 'Opis',
|
||||
'LBL_PDF_LIST_PRICE' => 'Cena',
|
||||
'LBL_PDF_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_LIST_VAT' => 'VAT',
|
||||
'LBL_PDF_LIST_TOTAL' => 'Suma',
|
||||
'LBL_PDF_TOTAL' => 'Suma',
|
||||
'LBL_PDF_DISCOUNT' => 'RABAT',
|
||||
'LBL_PDF_END_TOTAL' => 'Suma koncowa',
|
||||
'LBL_PDF_VAT' => 'VAT',
|
||||
'LBL_PDF_VATID' => 'VAT-ID',
|
||||
'LBL_PDF_NUMBER' => 'Numer',
|
||||
'LBL_PDF_DATE_REGISTER' => 'Data wystawienia',
|
||||
'LBL_PDF_VALIDTILL_DATE' => 'Waznosc zam<61>wienia',
|
||||
'LBL_PDF_OWNER' => 'Wystawil',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Zam<61>wienie',
|
||||
'LBL_PDF_FILENAME' => 'Purchase_Order_',
|
||||
'LBL_PDF_CODE' => '',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMINSIDEORDERS_PDFLANGUAGES_TITLE' => 'PDF Languages Settings',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Purchase Order is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Purchase Order to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Purchase Order status is set.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Now Purchase Order is waiting for confimations.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Purchase Order is confirmed.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Purchase Order status is set.",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Sending Purchase Order to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplicate',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Preview Purchase Order',
|
||||
'LBL_LIST_REJECT' => 'Reject',
|
||||
'LBL_LIST_ACCEPT' => 'Accept',
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Modified By',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Order Origin',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Preview',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Close',
|
||||
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Contact',
|
||||
'LBL_CONTACT_ID' => 'Contact Id',
|
||||
'LBL_PARENT_NAME_COPY' => 'Company Name',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Contact Person',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Contact Title',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Would you like to load default texts correspondencing to this language?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Download PDF',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
459
modules/EcmInsideOrders.cp/language/pl_pl.lang.php
Executable file
459
modules/EcmInsideOrders.cp/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,459 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_TYPE' => 'Typ',
|
||||
//added 24.11.2009
|
||||
'LBL_EDITTABLE_MOQ'=>'MOQ',
|
||||
//added 01.09.2009
|
||||
'LBL_ECMLANGUAGE'=>'Język',
|
||||
//added 27.08.2009
|
||||
'LBL_EDITTABLE_UNIT'=>'J.m.',
|
||||
//added 25.08.2009
|
||||
'LBL_CURRENCY'=>'Waluta',
|
||||
//added 16.02.2009
|
||||
'LBL_CREATE_PZ_BUTTON' => 'Stwórz PZ',
|
||||
//added 13.02.2009
|
||||
'LBL_ECMSTOCKDOCOUTS_SUBPANEL_TITLE'=>'Dokumenty WZ',
|
||||
'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE'=>'Faktury',
|
||||
'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE'=>'Dokumenty Przewozowe',
|
||||
//added 12.02.2009
|
||||
'LBL_CREATE_PZ'=>'Stwórz PZ',
|
||||
'LBL_CREATE_PZ_BUTTON_TITLE'=>'Stwórz PZ',
|
||||
'LBL_ECMSTOCKDOCINS_SUBPANEL_TITLE'=>'Dokumenty PZ',
|
||||
//added 22.01.2009
|
||||
'LBL_ECMINSIDEORDERS_SUBPANEL_TITLE' => 'Zamówienia Towaru',
|
||||
//added 20.01.2009
|
||||
'LBL_SEND_EMAIL_BUTTON_TITLE' => 'Wyslij Email',
|
||||
'LBL_SEND_EMAIL' => 'Wyslij Email',
|
||||
//added 07.01.2009
|
||||
'LBL_LIST_MY_ECMINSIDEORDERS' => 'Moje Przypisane Zamówienia Towaru',
|
||||
// added 20.12.2008
|
||||
'LBL_EDITTABLE_CBM' => 'CBM',
|
||||
'LBL_CBM_TOTAL' => 'Suma CBM',
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_END_DATE' => 'Data zakończenia',
|
||||
'LBL_PW_STOCK_NAME' => 'Magazyn PW',
|
||||
'LBL_RW_STOCK_NAME' => 'Magazyn RW',
|
||||
'LBL_EMPLOYERS' => 'Pracownicy',
|
||||
'LBL_PW_STOCK_ID' => 'Magazyn PW',
|
||||
'LBL_RW_STOCK_ID' => 'Magazyn RW',
|
||||
|
||||
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Zamówienia Towaru',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Zamówienia Towaru: Strona Glówna',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmInsideOrders',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Zamówień Towaru',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowe Zamówienie Towaru',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS' => 'Szczególy Zamówienia Towaru',
|
||||
|
||||
'LBL_ITEMS' => 'Zalaczone Produkty:',
|
||||
|
||||
'LBL_TEXTS' => 'Teksty do PDFa:',
|
||||
|
||||
'LBL_PREVIEW' => 'Podglad PDFa:',
|
||||
|
||||
'LBL_EMAIL' => 'Stwórz Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'Informacje o firmie:',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Szczególy',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Produkty',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Teksty',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Podglad',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Data dodania',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date modyfikacji',
|
||||
|
||||
'LBL_MODIFIED' => 'Ostatnio modyfikowane',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisane Do',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane Do',
|
||||
|
||||
'LBL_CREATED' => 'Utworzone Przez',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Utworzone Przez',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Zmodyfikowane Przez',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Przypisane Do',
|
||||
|
||||
'LBL_DELETED_BY' => 'Usuniete Przez',
|
||||
|
||||
'LBL_NUMBER' => 'Numer',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Numer',
|
||||
|
||||
'LBL_PARENT' => 'Do',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Firma',
|
||||
|
||||
'LBL_PARENT_ID' => 'Firma Id',
|
||||
|
||||
'LBL_TYPE' => 'Typ',
|
||||
|
||||
'LBL_ECMINSIDEORDER_ID' => 'Id Zamówienia Towaru',
|
||||
|
||||
'LBL_ECMINSIDEORDER_NAME' => 'Nazwa Zamówienia Towaru',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Data Dokumentu',
|
||||
|
||||
'LBL_SELL_DATE' => 'Data Kupna',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Data Platnosci',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Ulica',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Kod pocztowy / Miasto',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Panstwo',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Czy jest wolne od vatu?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Tekst naglówka',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Tekst stopki',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Dodatkowy tekst',
|
||||
|
||||
|
||||
|
||||
'LBL_SUBTOTAL' => 'Suma',
|
||||
|
||||
'LBL_TOTAL' => 'Suma',
|
||||
|
||||
'LBL_DISCOUNT' => 'Upust',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Zaakceptowane',
|
||||
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Id Szablonu',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Szablon',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Warunki Platnosci',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Warunki Platnosci ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Warunki Dostawy',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Warunki Dostawy ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Blad formatu numeru!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'Wystepuja bledy na liscie produktów albo w formularzu!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Blad formatu upustu',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Kod',
|
||||
'LBL_EDITTABLE_NAME' => 'Nazwa',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Ilosc',
|
||||
'LBL_EDITTABLE_PRICE' => 'Cena',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Upust',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Suma',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opcje',
|
||||
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'W góre',
|
||||
'LBL_MOVE_ROW_DOWN' => 'W dól',
|
||||
'LBL_INSERT_NEW_ROW' => 'Wstaw nowy wiersz',
|
||||
'LBL_DELETE_ROW' => 'Usun wiersz',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Wazne do',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMINSIDEORDER' => 'Utwórz Zamówienie Wewn.',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_LIST' => 'Lista Zamówień Wewn.',
|
||||
|
||||
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_IMG_NEW' => 'Nowy, dodaj do bazy',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edycja',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Chcesz potwierdzic to Zamówienie Towaru?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Pokaz PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Pokaz PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Pokaz Zamówienie Towaru w pliku PDF.',
|
||||
|
||||
'LBL_QUOTE_TO_INVOICE' => 'Stwórz Fakture',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_KEY' => 'Stwórz Fakture [Alt+I]',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_TITLE' => 'Stwórz Fakture.',
|
||||
|
||||
'LBL_QUOTE_TO_SALE' => 'Stwórz Zamówienie Towaru',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Stwórz Zamówienie Towaru [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Stwórz Zamówienie Towaru.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Wyslij Do Potwierdzenia',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Wyslij Do Potwierdzenia [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Wyslij Do Potwierdzenia.',
|
||||
|
||||
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Stwórz Fakture.',
|
||||
'LBL_LIST_TO_SALE' => 'Stwórz Zamówienie Towaru.',
|
||||
|
||||
|
||||
//buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Zapisz i Wyslij [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Zapisz i Wyslij',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Napraw [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Napraw',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Zaakceptuj [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Zaakceptuj',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Nie akceptuj [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Nie akceptuj',
|
||||
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Idz do listy Zamówien Towaru [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Idz do listy',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Wyslij Email',
|
||||
|
||||
|
||||
'LBL_NOT_SAVED' => 'Zamówienie Towaru nie zostalo zapisane. Sprawdz czy wszytskie pola sa poprawne!',
|
||||
|
||||
'LBL_SAVED' => 'Zamówienie Towaru zostalo zapisane pomyslnie.',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => '',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notatki',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emaile',
|
||||
|
||||
|
||||
|
||||
'LBL_DASHLET_MY_ECMINSIDEORDERS' => 'Zamówienia Towaru',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_PDF_LIST_POSITION' => 'Poz.',
|
||||
'LBL_PDF_LIST_QUANTITY' => 'Ilosc',
|
||||
'LBL_PDF_LIST_UNIT' => '',
|
||||
'LBL_PDF_LIST_DESCRIPTION' => 'Opis',
|
||||
'LBL_PDF_LIST_PRICE' => 'Cena',
|
||||
'LBL_PDF_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_LIST_VAT' => 'VAT',
|
||||
'LBL_PDF_LIST_TOTAL' => 'Suma',
|
||||
'LBL_PDF_TOTAL' => 'Suma',
|
||||
'LBL_PDF_DISCOUNT' => 'RABAT',
|
||||
'LBL_PDF_END_TOTAL' => 'Suma koncowa',
|
||||
'LBL_PDF_VAT' => 'VAT',
|
||||
'LBL_PDF_VATID' => 'VAT-ID',
|
||||
'LBL_PDF_NUMBER' => 'Numer',
|
||||
'LBL_PDF_DATE_REGISTER' => 'Data wystawienia',
|
||||
'LBL_PDF_VALIDTILL_DATE' => 'Waznosc oferty',
|
||||
'LBL_PDF_OWNER' => 'Wystawil',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Zamówienie Wewnętrzne',
|
||||
'LBL_PDF_FILENAME' => 'KOR_Document_',
|
||||
'LBL_PDF_CODE' => 'KOR',
|
||||
|
||||
'LNK_ECMINSIDEORDERS_PDFLANGUAGES' => 'Ustawienia PDF',
|
||||
'LBL_ECMINSIDEORDERS_PDFLANGUAGES_TITLE' => 'Ustawienia jezyków PDFa',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Correct Document is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Correct Document to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Status Zamówienia Towaru ustawiony.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Zamówienie Towaru czeka na potwierdzenie.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Zamówienie Towaru jest potwierdzone.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Status Zamówienia Towaru ustawiony.",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Blad wysylki do potwierdzenia! Odswiez strone i sprobuj ponownie.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Wyslij do Potwierdzenia',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplikuj',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Podglad Zamówienia Towaru',
|
||||
'LBL_LIST_REJECT' => 'Nie akceptuj',
|
||||
'LBL_LIST_ACCEPT' => 'Akceptuj',
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Zmodyfikowane Przez',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Zródlo zamówienia',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Podglad',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Zamknij',
|
||||
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Kontakt',
|
||||
'LBL_CONTACT_ID' => 'Id Kontaktu',
|
||||
'LBL_PARENT_NAME_COPY' => 'Nazwa Firmy',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Osoba Kontaktowa',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Tytul Kontaktu',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Czy zaladowac domyslne teksty dla tego jezyka?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Pobierz PDF',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
137
modules/EcmInsideOrders.cp/layout_defs.php
Executable file
137
modules/EcmInsideOrders.cp/layout_defs.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/**
|
||||
|
||||
* Layout definition for Accounts
|
||||
|
||||
*
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$layout_defs['EcmInsideOrders']['subpanel_setup'] = array (
|
||||
|
||||
|
||||
'ecmpzdocuments' => array (
|
||||
'order' => 10,
|
||||
'module' => 'EcmPzDocuments',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmpzdocuments',
|
||||
'add_subpanel_data' => 'po_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMPZDOCUMENTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmstockins' => array (
|
||||
'order' => 30,
|
||||
'module' => 'EcmStockIns',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockins',
|
||||
'add_subpanel_data' => 'ecmstockin_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKINS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmwzdocuments' => array (
|
||||
'order' => 40,
|
||||
'module' => 'EcmWzDocuments',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmwzdocuments',
|
||||
'add_subpanel_data' => 'wz_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMWZDOCUMENTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecminvoiceouts' => array (
|
||||
'order' => 50,
|
||||
'module' => 'EcmInvoiceOuts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecminvoiceouts',
|
||||
'add_subpanel_data' => 'ecminvoiceout_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmdeliverynotes' => array (
|
||||
'order' => 60,
|
||||
'module' => 'EcmDeliveryNotes',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmdeliverynotes',
|
||||
'add_subpanel_data' => 'dn_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE',
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
140
modules/EcmInsideOrders.cp/makeProduction.php
Executable file
140
modules/EcmInsideOrders.cp/makeProduction.php
Executable file
@@ -0,0 +1,140 @@
|
||||
<table cellspacing="0" cellpadding="0" border="0"><tr><td><img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts" width="16" border="0" height="16"></td><td><h2>Production: Make Production </h2></td></tr></table><br />
|
||||
<?php
|
||||
include_once("modules/EcmStockOperations/EcmStockOperation.php");
|
||||
include_once("modules/EcmSales/productionHelper.php");
|
||||
$op = new EcmStockOperation();
|
||||
|
||||
$rdoc=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecminsideorders where id='".$_REQUEST['record']."'"));
|
||||
$t.='<form action="index.php?module=EcmInsideOrders&action=saveProduction&record='.$_REQUEST['record'].'" method="post"><ul class="tablist" style="width:100%;">
|
||||
<li>
|
||||
<a class="current" href="#">RW</a>
|
||||
</li>
|
||||
</ul>';
|
||||
$t.='<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">
|
||||
Inventory</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">';
|
||||
$rs=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select name from ecmstocks where id='".$rdoc['rw_stock_id']."'"));$t.=$rs['name'];
|
||||
$t.='</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
$t.=$tbs;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.="Index";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Name";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Inventory";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Quantity";
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$w=$GLOBALS['db']->query("select * from ecmproducts_ecminsideorders where product_component=1 and deleted='0' and ecminsideorder_id='".$_REQUEST['record']."'");
|
||||
$used = array();
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
|
||||
$cat = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT product_category_id as cat FROM ecmproducts WHERE id='".$r['ecmproduct_id']."'"));
|
||||
$stop=0;
|
||||
//uwzględniamy już użyte
|
||||
$stock=($op->getStock($r['ecmproduct_id'],$rdoc['rw_stock_id'])-$used[$r['ecmproduct_id']]);
|
||||
if (!isset($used[$r['ecmproduct_id']])) $used[$r['ecmproduct_id']] = 0;
|
||||
if ($cat['cat']!='d7f876b0-1a3d-43a1-7c9b-511ba40df3d1')
|
||||
$used[$r['ecmproduct_id']]+=$r['product_prod_quantity'];
|
||||
$t.=$trs.$tds.$r['product_code'].$tde.$tds.$r['product_name'].$tde.$tds.$stock.$tde.$tds.$r['product_prod_quantity'].$tde.$tre;
|
||||
if($stock<$r['product_prod_quantity'])$stop=1;
|
||||
if($stop && $cat['cat']!='d7f876b0-1a3d-43a1-7c9b-511ba40df3d1'){
|
||||
$t.=$trs.$tds." ".$tde.$tds."<span style=\"color:red\">no products in stock</span>".$tde.$tds." ".$tde.$tds." ".$tde.$tre;
|
||||
$stop_arr[$r['product_guid']]=$r['product_guid'];
|
||||
}
|
||||
else{
|
||||
$rw_prod[]=array("id"=>$r['ecmproduct_id'],"quantity"=>$r['product_prod_quantity'],"guid"=>$r['product_guid'],'price'=>$r['product_price']);
|
||||
}
|
||||
}
|
||||
$t.=$tbe;
|
||||
$t.='<br><ul class="tablist" style="width:100%;">
|
||||
<li>
|
||||
<a class="current" href="#">PW</a>
|
||||
</li>
|
||||
</ul>';
|
||||
$t.='<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="dataLabel" width="10%" nowrap="nowrap">
|
||||
Inventory</td>
|
||||
<td class="dataField" width="30%" nowrap="nowrap">';
|
||||
$rs=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select name from ecmstocks where id='".$rdoc['pw_stock_id']."'"));$t.=$rs['name'];
|
||||
$t.='</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
$t.=$tbs;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.="Index";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Name";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Inventory";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Quantity";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Price";
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$w=$GLOBALS['db']->query("select * from ecmproducts_ecminsideorders where product_component!=1 and deleted='0' and ecminsideorder_id='".$_REQUEST['record']."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
if(in_array($r['product_guid'],$stop_arr))$stop="<br><span style=\"color:red\">no products in stock</span>";
|
||||
else {
|
||||
$stop="";
|
||||
$pw_prod[]=array("id"=>$r['ecmproduct_id'],"quantity"=>$r['product_prod_quantity'],"price"=>$r['product_price'],"guid"=>$r['product_guid']);
|
||||
}
|
||||
$t.=$trs.$tds.$r['product_code'].$tde.$tds.$r['product_name'].$stop.$tde.$tds.$op->getStock($r['ecmproduct_id'],$rdoc['pw_stock_id']).$tde.$tds.$r['product_prod_quantity'].$tde.$tds.$r['product_price'].$tde.$tre;
|
||||
}
|
||||
$t.=$tbe;
|
||||
//generate inputs
|
||||
//rw
|
||||
$t.='<input type="hidden" name="rw_stock" value="'.$rdoc['rw_stock_id'].'">';
|
||||
if(count($rw_prod)>0){
|
||||
foreach($rw_prod as $rp){
|
||||
$t.='<input type="hidden" name="rw_id[]" value="'.$rp['id'].'">';
|
||||
$t.='<input type="hidden" name="rw_quantity[]" value="'.$rp['quantity'].'">';
|
||||
$t.='<input type="hidden" name="rw_price[]" value="'.$rp['price'].'">';
|
||||
$t.='<input type="hidden" name="rw_guid[]" value="'.$rp['guid'].'">';
|
||||
}
|
||||
}
|
||||
//pw
|
||||
$t.='<input type="hidden" name="pw_stock" value="'.$rdoc['pw_stock_id'].'">';
|
||||
if(count($pw_prod)>0){
|
||||
foreach($pw_prod as $pp){
|
||||
$t.='<input type="hidden" name="pw_id[]" value="'.$pp['id'].'">';
|
||||
$t.='<input type="hidden" name="pw_quantity[]" value="'.$pp['quantity'].'">';
|
||||
$t.='<input type="hidden" name="pw_price[]" value="'.$pp['price'].'">';
|
||||
$t.='<input type="hidden" name="pw_guid[]" value="'.$pp['guid'].'">';
|
||||
}
|
||||
}
|
||||
function check0stocks($d){
|
||||
if(count($d)>0){
|
||||
foreach($d as $dd){
|
||||
if ($dd['category_id']='d7f876b0-1a3d-43a1-7c9b-511ba40df3d1') continue;
|
||||
if($dd['quantity']==0 || $dd['quantity']=="")return false;
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(check0stocks($rw_prod) && check0stocks($pw_prod) && count($stop_arr)==0)$t.='<br><input type="submit" class="button" name="save_documents" value="Confirm" />';
|
||||
else $t.="<br>Check stocks or please fill production quantities in Inside Order";
|
||||
$t.='</form>';
|
||||
echo $t;
|
||||
|
||||
?>
|
||||
121
modules/EcmInsideOrders.cp/metadata/SearchFields.php
Executable file
121
modules/EcmInsideOrders.cp/metadata/SearchFields.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$searchFields['EcmInsideOrders'] = array (
|
||||
|
||||
'current_user_only' => array ( 'query_type' => 'default', 'db_field' => array ( 'assigned_user_id' ), 'my_items' => true ),
|
||||
|
||||
'assigned_user_id' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'status' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'register_date' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'parent_name' => array( 'query' => 'default' ),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
403
modules/EcmInsideOrders.cp/metadata/detailviewdefs.php
Executable file
403
modules/EcmInsideOrders.cp/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,403 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
* *******************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
|
||||
|
||||
$viewdefs['EcmInsideOrders']['DetailView'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'form' => array (
|
||||
|
||||
'buttons' => array (
|
||||
|
||||
array(
|
||||
'customCode' => '{if $CID==0}<input title="{$APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{$APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'EcmInsideOrders\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'EditView\';" type="submit" name="Edit" id="edit_button" value="{$APP.LBL_EDIT_BUTTON_LABEL}">{/if}'
|
||||
),
|
||||
array(
|
||||
'customCode' => '{if $CID==0}<input title="{$APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{$APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'EcmInsideOrders\'; this.form.return_action.value=\'DetailView\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\'; this.form.return_id.value=\'{$id}\';" type="submit" name="Duplicate" value="{$APP.LBL_DUPLICATE_BUTTON_LABEL}" id="duplicate_button">{/if}'
|
||||
),
|
||||
array(
|
||||
'customCode' => '{if $CID==0}<input title="{$APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{$APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'EcmInsideOrders\'; this.form.return_action.value=\'ListView\'; this.form.action.value=\'Delete\'; return confirm(\'{$APP.NTC_DELETE_CONFIRMATION}\');" type="submit" name="Delete" value="{$APP.LBL_DELETE_BUTTON_LABEL}">{/if}'
|
||||
),
|
||||
array(
|
||||
'customCode' => '{if $CID==0}<input name="create_production" id="create_production" title="Create Production" class="button" onclick="window.location = \'index.php?module=EcmInsideOrders&action=makeProduction&record={$fields.id.value}\';" type="button" value="Create Production">{/if}'
|
||||
),
|
||||
array(
|
||||
'customCode' => '{if $CID>0}<input name="send_email" id="send_email" title="{$MOD.LBL_SEND_EMAIL_BUTTON_TITLE}" accessKey="{$MOD.LBL_SEND_EMAIL_BUTTON_KEY}" class="button" onclick="EcmPreviewPDF(\'index.php?module=EcmEmails&action=Emails\');" type="button" value="{$MOD.LBL_SEND_EMAIL}">{/if}'
|
||||
),
|
||||
array(
|
||||
'customCode' => '{$CATALOGUE}'
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'hidden'=>array(
|
||||
|
||||
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
|
||||
|
||||
'<input type="hidden" name="discount" id="discount" value=\'{$fields.discount.value}\'>',
|
||||
|
||||
'<input type="hidden" name="parent_type" id="parent_type" value="{$fields.parent_type.value}">',
|
||||
|
||||
'<input type="hidden" name="parent_id" id="parent_id" value="{$fields.parent_id.value}">',
|
||||
|
||||
'<input type="hidden" name="assigned_user_id" id="assigned_user_id" value="{$fields.assigned_user_id.value}">',
|
||||
|
||||
'<input type="hidden" name="email_id" id="email_id" value="">',
|
||||
|
||||
'<span id="quickInfoH2" style="display:none;"> <span>{$fields.document_no.value}</span> - <span>{$fields.parent_name.value}</span> - <span>{$fields.parent_contact_name.value}</span> - <span>{$fields.parent_address_street.value}</span> <span>{$fields.parent_address_postalcode.value}</span> <span>{$fields.parent_address_city.value}</span> <span>{$fields.parent_address_country.value}</span> - <span>{$fields.total.value}</span></span>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
array ('label' => '10', 'field' => '30'),
|
||||
|
||||
array ('label' => '10', 'field' => '30')
|
||||
|
||||
),
|
||||
|
||||
'includes' => array(
|
||||
array('file'=>'include/JSON.js'),
|
||||
array('file'=>'modules/EcmInsideOrders/MyTable.js'),
|
||||
array('file'=>'modules/EcmInsideOrders/EcmInsideOrdersDetailView.js'),
|
||||
array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'panels' => array (
|
||||
|
||||
'LBL_DETAILS_TAB'=> array(
|
||||
|
||||
array(
|
||||
|
||||
'document_no',
|
||||
|
||||
'assigned_user_name'
|
||||
|
||||
),
|
||||
array('name','template_name'),
|
||||
array (
|
||||
'parent_name',
|
||||
'type',
|
||||
),
|
||||
array(
|
||||
'register_date','end_date',
|
||||
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'rw_stock_id',
|
||||
'label'=>'LBL_RW_STOCK_ID',
|
||||
'customCode' => '{$RW_STOCK}',
|
||||
),
|
||||
array(
|
||||
'name' => 'pw_stock_id',
|
||||
'label'=>'LBL_PW_STOCK_ID',
|
||||
'customCode' => '{$PW_STOCK}',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'employers',
|
||||
'label'=>'LBL_EMPLOYERS',
|
||||
'customCode' => '{$EMPLOYERS}',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<br><b>{$MOD.LBL_TO_INFORMATIONS}</b>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_name_copy',
|
||||
'customCode' => '{$fields.parent_name.value}',
|
||||
),
|
||||
'ecmlanguage'
|
||||
),
|
||||
array ('parent_address_street', ''),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => 't',
|
||||
'customCode' => '{$fields.parent_address_postalcode.value} {$fields.parent_address_city.value}'
|
||||
),
|
||||
''
|
||||
),
|
||||
array ('parent_address_country', ''),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_ITEMS_TAB'=> array(
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '
|
||||
|
||||
'
|
||||
|
||||
// .'{literal}'.
|
||||
|
||||
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
|
||||
|
||||
// .'{/literal}'.
|
||||
|
||||
.'
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmInsideOrders/MyTable.css" />
|
||||
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;">
|
||||
|
||||
<table class="positions" style="width:100%;" id="itemsTable">
|
||||
|
||||
<thead id="head">
|
||||
|
||||
<tr id="tr">
|
||||
|
||||
<td width="6%">{$MOD.LBL_EDITTABLE_NO}</td>
|
||||
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
|
||||
|
||||
<td width="33%">{$MOD.LBL_EDITTABLE_NAME}</td>
|
||||
|
||||
<td width="7%">Qty.</td>
|
||||
|
||||
<td width="7%">Prod. Qty.</td>
|
||||
|
||||
<td width="9%">{$MOD.LBL_EDITTABLE_PRICE}</td>
|
||||
|
||||
<td width="1%"> </td>
|
||||
|
||||
<td width="7%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody id="tbody">
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td width="55%" class="dataLabel" valign="top">
|
||||
|
||||
|
||||
|
||||
</td> <!--color:#b3b9cf;-->
|
||||
|
||||
<td width="40%" class="dataField" style="text-align: left;">
|
||||
|
||||
<br>
|
||||
|
||||
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
|
||||
|
||||
<tr id="subtotal_tr">
|
||||
|
||||
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
|
||||
|
||||
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="total_tr">
|
||||
|
||||
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
|
||||
|
||||
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total_2" id="total_2" value=\'\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="total_tr">
|
||||
|
||||
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
|
||||
|
||||
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
<td width="5%" class="dataField" style="text-align: left;"> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
',
|
||||
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_TEXTS_TAB'=> array(
|
||||
|
||||
array('header_text'),
|
||||
|
||||
array('footer_text'),
|
||||
|
||||
array('ads_text'),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_PREVIEW_TAB'=> array(
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'preview_panel',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<span id="previewPDF" width="100%" height="100%"></span>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_EMAIL_TAB'=> array(
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'email_panel',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '{$EMAIL_LINK_TAB}<span id="emailTAB" width="100%" height="100%"></span>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
142
modules/EcmInsideOrders.cp/metadata/detailviewdefs2.php
Executable file
142
modules/EcmInsideOrders.cp/metadata/detailviewdefs2.php
Executable file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
* *******************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
|
||||
|
||||
$viewdefs['EcmInsideOrders']['DetailView'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'form' => array (
|
||||
|
||||
'buttons' => array ('EDIT', 'DUPLICATE', 'DELETE',
|
||||
|
||||
array(
|
||||
|
||||
'customCode' => '<input name="quote_pdf" id="quote_pdf" title="{$MOD.LBL_QUOTE_PDF_BUTTON_TITLE}" accessKey="{$MOD.LBL_QUOTE_PDF_BUTTON_KEY}" class="button" onclick="window.open(\'index.php?module=EcmInsideOrders&action=previewPDF&to_pdf=1&record={$fields.id.value}\');" type="button" value="{$MOD.LBL_QUOTE_PDF}">'
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|
||||
array(
|
||||
|
||||
'customCode' => '<input name="workreport_to_invoice" id="workreport_to_invoice" title="{$MOD.LBL_WORKREPORT_TO_INVOICE_BUTTON_TITLE}" accessKey="{$MOD.LBL_WORKREPORT_TO_INVOICE_BUTTON_KEY}" class="button" onclick="window.location = \'index.php?module=EcmInvoiceOuts&action=EditView&work_report_record={$fields.id.value}\';" type="button" value="{$MOD.LBL_WORKREPORT_TO_INVOICE}">'
|
||||
|
||||
),
|
||||
|
||||
*/
|
||||
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
array ('label' => '10', 'field' => '30'),
|
||||
|
||||
array ('label' => '10', 'field' => '30')
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'panels' => array (
|
||||
|
||||
array('name', 'assigned_user_name'),
|
||||
|
||||
array('date_time_start', 'account_name'),
|
||||
|
||||
array('date_time_end', 'contact_name'),
|
||||
|
||||
array(
|
||||
|
||||
'parent_name',
|
||||
|
||||
'status'
|
||||
|
||||
),
|
||||
|
||||
array('description'),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
415
modules/EcmInsideOrders.cp/metadata/editviewdefs.php
Executable file
415
modules/EcmInsideOrders.cp/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,415 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
|
||||
global $sugar_config;
|
||||
|
||||
$viewdefs['EcmInsideOrders']['EditView'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'enctype'=>'multipart/form-data',
|
||||
'buttons'=>array(
|
||||
array('customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="return SaveForm();" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">'),
|
||||
'CANCEL',
|
||||
//array('customCode' => '<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="window.location=\'index.php?module=EcmInsideOrders&action=DetailView&record=\'+this.form.record.value;" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">'),
|
||||
array('customCode' => ' <input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="window.location=\'index.php?module=EcmInsideOrders&action=index\'" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}">'),
|
||||
),
|
||||
|
||||
'hidden'=>array(
|
||||
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
|
||||
'<input type="hidden" name="email_id" id="email_id" value=\'\'>',
|
||||
'<input type="hidden" name="parent_type" id="parent_type" value="Accounts">',
|
||||
|
||||
//'<input type="hidden" name="status" id="status" value=\'{$fields.status.value}\'>',//{$fields.email_id.value}\'>',
|
||||
// '<input type="hidden" name="total" id="total" value=\'{$fields.total.value}\'>',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
|
||||
|
||||
'widths' => array (
|
||||
|
||||
array('label' => '10', 'field' => '30'),
|
||||
|
||||
array('label' => '10', 'field' => '30'),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'includes' => array(
|
||||
|
||||
array('file'=>'include/JSON.js'),
|
||||
|
||||
array('file'=>'include/javascript/quicksearch.js'),
|
||||
array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
|
||||
|
||||
array('file'=>'modules/EcmInsideOrders/AjaxSearch/AjaxSearch.js'),
|
||||
|
||||
array('file'=>'modules/EcmInsideOrders/formloader.js'),
|
||||
|
||||
array('file'=>'modules/EcmInsideOrders/MyTable.js'),
|
||||
|
||||
array('file'=>'modules/EcmInsideOrders/EcmInsideOrders.js'),
|
||||
|
||||
array('file'=>'modules/EcmInsideOrders/CreateItem.js'),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'panels' => array (
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS_TAB'=> array(
|
||||
|
||||
array(
|
||||
array(
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input readonly="readonly" type="text" name="document_no" id="document_no" value=\'{$fields.document_no.value}\'>
|
||||
<input type="hidden" name="number" id="number" value=\'{$fields.number.value}\'>'
|
||||
),
|
||||
array(
|
||||
'name' => 'assigned_user_name',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array('name', array(
|
||||
'name' => 'template_name',
|
||||
'label'=>'LBL_TEMPLATE_NAME',
|
||||
'tabIndex' => '1',
|
||||
'customCode'=>'<select tabindex="1" id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">{$DOCUMENT_TEMPLATES_OPTIONS}</select><input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">'
|
||||
),),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_name',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
array(
|
||||
'name' => 'type',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'register_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams'=>array('showFormats'=>true)
|
||||
),
|
||||
array(
|
||||
'name' => 'end_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams'=>array('showFormats'=>true)
|
||||
),
|
||||
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'rw_stock_id',
|
||||
'label'=>'LBL_RW_STOCK_ID',
|
||||
'tabIndex' => '1',
|
||||
'customCode'=>'<select tabindex="1" id="rw_stock_id" name="rw_stock_id">{$RW_STOCK}</select>',
|
||||
),
|
||||
array(
|
||||
'name' => 'pw_stock_id',
|
||||
'label'=>'LBL_PW_STOCK_ID',
|
||||
'tabIndex' => '1',
|
||||
'customCode'=>'<select tabindex="1" id="pw_stock_id" name="pw_stock_id">{$PW_STOCK}</select>',
|
||||
),
|
||||
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'employers',
|
||||
'label'=>'LBL_EMPLOYERS',
|
||||
'tabIndex' => '1',
|
||||
'customCode'=>'<input type="hidden" name="employers_multi" id="employers_multi"><select tabindex="1" id="employers[]" name="employers[]" multiple="true">{$EMPLOYERS}</select>',
|
||||
),
|
||||
|
||||
),
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_name_copy',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input type="text" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" readOnly="readonly" size="30" />'
|
||||
),
|
||||
array(
|
||||
'name' => 'ecmlanguage',
|
||||
'tabIndex' => '1',
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_street',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<textarea tabindex="1" id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150" >{$fields.parent_address_street.value}</textarea>',
|
||||
),
|
||||
''
|
||||
),
|
||||
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input maxlength="8" type="text" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" style="vertical-align:top;width:80px;" /> <input type="text" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" style="vertical-align:top;width:150px;" />'
|
||||
),
|
||||
''
|
||||
),
|
||||
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_country',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
''
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_ITEMS_TAB'=> array(
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '
|
||||
|
||||
'
|
||||
|
||||
// .'{literal}'.
|
||||
|
||||
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
|
||||
|
||||
// .'{/literal}'.
|
||||
|
||||
.'
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmInsideOrders/MyTable.css" />
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmInsideOrders/AjaxSearch/AjaxSearch.css" />
|
||||
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV">
|
||||
|
||||
<table class="positions" style="width:100%;" id="itemsTable">
|
||||
|
||||
<thead id="head">
|
||||
|
||||
<tr id="tr">
|
||||
|
||||
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
|
||||
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
|
||||
|
||||
<td width="31%">{$MOD.LBL_EDITTABLE_NAME}</td>
|
||||
|
||||
<td width="7%">Qty.</td>
|
||||
|
||||
<td width="7%">Prod. Qty.</td>
|
||||
|
||||
<td width="9%">{$MOD.LBL_EDITTABLE_PRICE}</td>
|
||||
|
||||
<td width="9%">Stock</td>
|
||||
|
||||
<td width="6%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
|
||||
|
||||
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody id="tbody">
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td width="55%" class="dataLabel" valign="top">
|
||||
|
||||
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
|
||||
|
||||
</td> <!--color:#b3b9cf;-->
|
||||
|
||||
<td width="40%" class="dataField" style="text-align: left;">
|
||||
|
||||
<br>
|
||||
|
||||
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
|
||||
|
||||
<tr id="subtotal_tr">
|
||||
|
||||
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
|
||||
|
||||
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<tr id="total_tr">
|
||||
|
||||
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
|
||||
|
||||
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total_2" id="total_2" value=\'\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="total_tr">
|
||||
|
||||
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
|
||||
|
||||
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
<td width="5%" class="dataField" style="text-align: left;"> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
',
|
||||
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_TEXTS_TAB'=> array(
|
||||
|
||||
array(array('name' => 'header_text', 'label' => 'LBL_HEADER_TEXT', 'customCode' => '{$MFP.footer}<br /><textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>'),),
|
||||
|
||||
array(array('name' => 'footer_text', 'label' => 'LBL_FOOTER_TEXT','customCode' => '{$MFP.header}<br /><textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>'),),
|
||||
|
||||
array(array('name' => 'ads_text', 'label' => 'LBL_ADS_TEXT','customCode' => '{$MFP.ads}<br /><textarea id="ads_text" name="ads_text" rows="5" style="width:100%;">{$fields.ads_text.value}</textarea>'),),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'LBL_PREVIEW_TAB'=> array(
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'name' => 'preview_panel',
|
||||
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<span id=\'previewPDF\' width="100%" height="100%"></span>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
502
modules/EcmInsideOrders.cp/metadata/editviewdefs2.php
Executable file
502
modules/EcmInsideOrders.cp/metadata/editviewdefs2.php
Executable file
@@ -0,0 +1,502 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
* *******************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $sugar_config;
|
||||
|
||||
|
||||
|
||||
$path = 'modules/EcmInsideOrders/ModuleFieldsParser/ModuleFieldsParser.php';
|
||||
|
||||
if(file_exists($path)) {
|
||||
|
||||
require_once($path);
|
||||
|
||||
$mfp = new ModuleFieldsParser();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
if((!isset($focus->footer_text) || $focus->footer_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->footer_text = translate('LBL_DEFAULT_FOOTER_TEXT', 'EcmDocumentTemplates');
|
||||
|
||||
if((!isset($focus->header_text) || $focus->header_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->header_text = translate('LBL_DEFAULT_HEADER_TEXT', 'EcmDocumentTemplates');
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$viewdefs['EcmInsideOrders']['EditView'] = array (
|
||||
|
||||
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'form' => array (
|
||||
|
||||
'enctype'=>'multipart/form-data',
|
||||
|
||||
'buttons'=>array(
|
||||
|
||||
'SAVE',
|
||||
|
||||
'CANCEL',
|
||||
|
||||
),
|
||||
|
||||
'hidden'=>array(
|
||||
|
||||
// '<input type="hidden" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'>',
|
||||
|
||||
// '<input type="hidden" name="total" id="total" value=\'{$fields.total.value}\'>',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
|
||||
|
||||
'widths' => array (
|
||||
|
||||
array('label' => '10', 'field' => '30'),
|
||||
|
||||
array('label' => '10', 'field' => '30'),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'includes' => array(
|
||||
|
||||
array('file'=>'include/JSON.js'),
|
||||
|
||||
array('file'=>'include/javascript/quicksearch.js'),
|
||||
|
||||
array('file'=>'modules/EcmInsideOrders/EcmInsideOrders.js'),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'panels' => array (
|
||||
|
||||
|
||||
|
||||
'DETAILS'=> array(
|
||||
|
||||
|
||||
|
||||
array(array('type' => 'tab','active' => true,)),
|
||||
|
||||
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'name' => 'document_no',
|
||||
|
||||
'tabIndex' => 'f',
|
||||
|
||||
'customCode' => '<input readonly="readonly" type="text" name="document_no" id="document_no" value=\'{$fields.document_no.value}\'>
|
||||
|
||||
<input type="hidden" name="number" id="number" value=\'{$fields.number.value}\'>'
|
||||
|
||||
),
|
||||
|
||||
'assigned_user_name'
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
'parent_name',
|
||||
|
||||
'type'
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
'',
|
||||
|
||||
'ecminsideorder_name'
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
'status',
|
||||
|
||||
''
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array('name'=>'register_date','type'=>'date','displayParams'=>array('showFormats'=>true)),
|
||||
|
||||
''
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array('name'=>'sell_date','type'=>'date','displayParams'=>array('showFormats'=>true)),
|
||||
|
||||
'',
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array('name'=>'payment_date','type'=>'date','displayParams'=>array('showFormats'=>true)),
|
||||
|
||||
array(
|
||||
|
||||
'label'=>'LBL_TEMPLATE_NAME',
|
||||
|
||||
'customCode'=>'<select id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">{$DOCUMENT_TEMPLATES_OPTIONS}</select><input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">'
|
||||
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<br><div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
array (
|
||||
|
||||
array(
|
||||
|
||||
'name' => 'parent_address_street',
|
||||
|
||||
'tabIndex' => 'p',
|
||||
|
||||
'customCode' => '<textarea id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150">{$fields.parent_address_street.value}</textarea>',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
array ('parent_address_postalcode', 'to_nip'),
|
||||
|
||||
array ('parent_address_city', 'to_vatid'),
|
||||
|
||||
array (
|
||||
|
||||
'parent_address_country',
|
||||
|
||||
array(
|
||||
|
||||
'name' => 'to_is_vat_free',
|
||||
|
||||
'tabIndex' => 't',
|
||||
|
||||
'customCode' => '<input type="checkbox" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" onClick="N.calculateTotal();" {if $fields.to_is_vat_free.value == 1}checked{/if}>'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'ITEMS'=> array(
|
||||
|
||||
array(array('type' => 'tab')),
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '
|
||||
|
||||
'
|
||||
|
||||
// .'{literal}'.
|
||||
|
||||
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
|
||||
|
||||
// .'{/literal}'.
|
||||
|
||||
.'
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmInsideOrders/MyTable.css" />
|
||||
|
||||
<script src="modules/EcmInsideOrders/MyTable.js"></script>
|
||||
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:300px;max-height:300px;overflow:auto;">
|
||||
|
||||
<table class="positions" style="width:100%;" id="itemsTable">
|
||||
|
||||
<thead id="head">
|
||||
|
||||
<tr id="tr">
|
||||
|
||||
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
|
||||
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
|
||||
|
||||
<td width="42%">{$MOD.LBL_EDITTABLE_NAME}</td>
|
||||
|
||||
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
|
||||
|
||||
<td width="13%">{$MOD.LBL_EDITTABLE_PRICE}</td>
|
||||
|
||||
<td width="8%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
|
||||
|
||||
<td width="13%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
|
||||
|
||||
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody id="tbody">
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td width="55%" class="dataLabel" valign="top">
|
||||
|
||||
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
|
||||
|
||||
</td> <!--color:#b3b9cf;-->
|
||||
|
||||
<td width="40%" class="dataField" style="text-align: left;">
|
||||
|
||||
<br>
|
||||
|
||||
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
|
||||
|
||||
<tr id="subtotal_tr">
|
||||
|
||||
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
|
||||
|
||||
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr id="total_tr">
|
||||
|
||||
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
|
||||
|
||||
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
<td width="5%" class="dataField" style="text-align: left;"> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
',
|
||||
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'TEXTS'=> array(
|
||||
|
||||
array(array('type' => 'tab')),
|
||||
|
||||
|
||||
|
||||
array(array('label' => 'LBL_HEADER_TEXT','customCode' => $mfp->getFormHTML(true, 'header')),),
|
||||
|
||||
array(array('tabIndex'=>'f', 'customCode'=>'<textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>')),
|
||||
|
||||
|
||||
|
||||
array(array('label' => 'LBL_FOOTER_TEXT','customCode' => $mfp->getFormHTML(true, 'footer')),),
|
||||
|
||||
array(array('tabIndex'=>'f', 'customCode'=>'<textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>')),
|
||||
|
||||
|
||||
|
||||
array(array('label' => 'LBL_ADS_TEXT','customCode' => $mfp->getFormHTML(true, 'ads')),),
|
||||
|
||||
array(array('tabIndex'=>'f', 'customCode'=>'<textarea id="ads_text" name="ads_text" rows="5" style="width:100%;">{$fields.ads_text.value}</textarea>')),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'PREVIEW'=> array(
|
||||
|
||||
array(array('type' => 'tab')),
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'customCode' => 'preview'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'EMAIL'=> array(
|
||||
|
||||
array(array('type' => 'tab')),
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'customCode' => 'email'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
160
modules/EcmInsideOrders.cp/metadata/listviewdefs.php
Executable file
160
modules/EcmInsideOrders.cp/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$listViewDefs["EcmInsideOrders"] = array(
|
||||
'CONTACT_NAME'=>array(
|
||||
'label'=>'LBL_CONTACT_NAME',
|
||||
),
|
||||
'ECMLANGUAGE'=>array(
|
||||
'label'=>'LBL_ECMLANGUAGE',
|
||||
),
|
||||
'PARENT_NAME_COPY'=>array(
|
||||
'label'=>'LBL_PARENT_NAME_COPY',
|
||||
),
|
||||
'PARENT_CONTACT_NAME'=>array(
|
||||
'label'=>'LBL_PARENT_CONTACT_NAME',
|
||||
),
|
||||
'PARENT_CONTACT_TITLE'=>array(
|
||||
'label'=>'LBL_PARENT_CONTACT_TITLE',
|
||||
),
|
||||
'TO_IS_VAT_FREE'=>array(
|
||||
'label'=>'LBL_TO_IS_VAT_FREE',
|
||||
),
|
||||
'PARENT_ADDRESS_STREET'=>array(
|
||||
'label'=>'LBL_PARENT_ADDRESS_STREET',
|
||||
),
|
||||
'PARENT_ADDRESS_POSTALCODE'=>array(
|
||||
'label'=>'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
),
|
||||
'PARENT_ADDRESS_COUNTRY'=>array(
|
||||
'label'=>'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
),
|
||||
'PARENT_ADDRESS_CITY'=>array(
|
||||
'label'=>'LBL_PARENT_ADDRESS_CITY',
|
||||
),
|
||||
'STATUS' => array(
|
||||
'width' => '1',
|
||||
'label' => ' ',
|
||||
'default' => true,
|
||||
),
|
||||
'DOCUMENT_NO' => array(
|
||||
'width' => '12',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
),
|
||||
'NAME' => array(
|
||||
'width' => '12',
|
||||
'label' => 'LBL_NAME',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '15',
|
||||
'module' => 'Accounts',
|
||||
'id' => 'PARENT_ID',
|
||||
'link' => true,
|
||||
'label' => 'LBL_PARENT_NAME',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'REGISTER_DATE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_REGISTER_DATE',
|
||||
'default' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
'END_DATE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_END_DATE',
|
||||
'default' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
'PW_STOCK_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_PW_STOCK_NAME',
|
||||
'default' => true,
|
||||
),
|
||||
'RW_STOCK_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_RW_STOCK_NAME',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'TOTAL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_TOTAL',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
),
|
||||
|
||||
'OPTIONS' => array (
|
||||
'width' => '2',
|
||||
'label' => ' ',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'right',
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
130
modules/EcmInsideOrders.cp/metadata/searchdefs.php
Executable file
130
modules/EcmInsideOrders.cp/metadata/searchdefs.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$searchdefs['EcmInsideOrders'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'maxColumns' => '3',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
'label' => '10',
|
||||
|
||||
'field' => '30'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'layout' => array (
|
||||
|
||||
'basic_search' => array (
|
||||
|
||||
'document_no',
|
||||
'name',
|
||||
'parent_name',
|
||||
'register_date',
|
||||
'end_date',
|
||||
'status',
|
||||
'assigned_user_name',
|
||||
|
||||
|
||||
),
|
||||
|
||||
'advanced_search' => array (
|
||||
|
||||
'document_no',
|
||||
'name',
|
||||
'parent_name',
|
||||
'register_date',
|
||||
'end_date',
|
||||
'status',
|
||||
'assigned_user_name',
|
||||
'ecmlanguage',
|
||||
'parent_name_copy',
|
||||
'total',
|
||||
'parent_address_street',
|
||||
'parent_address_postalcode',
|
||||
'parent_address_country',
|
||||
'parent_address_city',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
76
modules/EcmInsideOrders.cp/metadata/studio.php
Executable file
76
modules/EcmInsideOrders.cp/metadata/studio.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$GLOBALS['studioDefs']['EcmInsideOrders'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmInsideOrders/DetailView.html',
|
||||
'php_file' => 'modules/EcmInsideOrders/DetailView.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmInsideOrders/EditView.html',
|
||||
'php_file' => 'modules/EcmInsideOrders/EditView.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template' => 'listview',
|
||||
'meta_file' => 'modules/EcmInsideOrders/listviewdefs.php',
|
||||
'type' => 'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmInsideOrders/SearchForm.html',
|
||||
'php_file' => 'modules/EcmInsideOrders/ListView.php',
|
||||
'type' => 'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
137
modules/EcmInsideOrders.cp/metadata/subpaneldefs.php
Executable file
137
modules/EcmInsideOrders.cp/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/**
|
||||
|
||||
* Layout definition for Accounts
|
||||
|
||||
*
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$layout_defs['EcmInsideOrders']['subpanel_setup'] = array (
|
||||
|
||||
/*
|
||||
'ecmstockdocins' => array (
|
||||
'order' => 10,
|
||||
'module' => 'EcmStockDocIns',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockdocins',
|
||||
'add_subpanel_data' => 'po_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKDOCINS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmstockins' => array (
|
||||
'order' => 30,
|
||||
'module' => 'EcmStockIns',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockins',
|
||||
'add_subpanel_data' => 'ecmstockin_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKINS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmstockdocouts' => array (
|
||||
'order' => 40,
|
||||
'module' => 'EcmStockDocOuts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockdocouts',
|
||||
'add_subpanel_data' => 'wz_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKDOCOUTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecminvoiceouts' => array (
|
||||
'order' => 50,
|
||||
'module' => 'EcmInvoiceOuts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecminvoiceouts',
|
||||
'add_subpanel_data' => 'ecminvoiceout_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmdeliverynotes' => array (
|
||||
'order' => 60,
|
||||
'module' => 'EcmDeliveryNotes',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmdeliverynotes',
|
||||
'add_subpanel_data' => 'dn_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE',
|
||||
),*/
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
137
modules/EcmInsideOrders.cp/metadata/subpaneldefs2.php
Executable file
137
modules/EcmInsideOrders.cp/metadata/subpaneldefs2.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/**
|
||||
|
||||
* Layout definition for Accounts
|
||||
|
||||
*
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
$layout_defs['EcmInsideOrders']['subpanel_setup'] = array (
|
||||
|
||||
|
||||
'ecmstockdocins' => array (
|
||||
'order' => 10,
|
||||
'module' => 'EcmStockDocIns',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockdocins',
|
||||
'add_subpanel_data' => 'po_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKDOCINS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmstockins' => array (
|
||||
'order' => 30,
|
||||
'module' => 'EcmStockIns',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockins',
|
||||
'add_subpanel_data' => 'ecmstockin_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKINS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmstockdocouts' => array (
|
||||
'order' => 40,
|
||||
'module' => 'EcmStockDocOuts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmstockdocouts',
|
||||
'add_subpanel_data' => 'wz_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMSTOCKDOCOUTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecminvoiceouts' => array (
|
||||
'order' => 50,
|
||||
'module' => 'EcmInvoiceOuts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecminvoiceouts',
|
||||
'add_subpanel_data' => 'ecminvoiceout_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE',
|
||||
),
|
||||
'ecmdeliverynotes' => array (
|
||||
'order' => 60,
|
||||
'module' => 'EcmDeliveryNotes',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'get_subpanel_data' => 'ecmdeliverynotes',
|
||||
'add_subpanel_data' => 'dn_id',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE',
|
||||
),
|
||||
|
||||
);
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
|
||||
117
modules/EcmInsideOrders.cp/metadata/subpanels/default.php
Executable file
117
modules/EcmInsideOrders.cp/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
error_reporting(0);
|
||||
$subpanel_layout = array(
|
||||
/*'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmInsideOrders'),
|
||||
),*/
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array (
|
||||
'status' => array (
|
||||
'name' => 'status',
|
||||
'vname' => ' ',
|
||||
'width' => '1%',
|
||||
),
|
||||
/*
|
||||
'number' => array (
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'module' => 'EcmInsideOrders',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
*/
|
||||
'document_no' => array (
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'module' => 'EcmInsideOrders',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '15%',
|
||||
),
|
||||
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'module' => 'EcmInsideOrders',
|
||||
'width' => '40%'
|
||||
),
|
||||
|
||||
'total' => array (
|
||||
'name' => 'total',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'module' => 'EcmInsideOrders',
|
||||
'width' => '15%',
|
||||
),
|
||||
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'module' => 'EcmInsideOrders',
|
||||
'width' => '10%',
|
||||
),
|
||||
|
||||
'options' => array (
|
||||
'name' => 'options',
|
||||
'label' => ' ',
|
||||
'default' => true,
|
||||
'width' => '2%',
|
||||
'sortable' => false,
|
||||
),
|
||||
/*
|
||||
'PDF_URL' => array(
|
||||
'width' => '2%',
|
||||
'label' => ' ',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
29
modules/EcmInsideOrders.cp/popup_fields.php
Executable file
29
modules/EcmInsideOrders.cp/popup_fields.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
function getPopupFieldsJsCode($module,$id)
|
||||
{
|
||||
require_once("modules/".$module."/popup_fields.php");
|
||||
$js='';
|
||||
if($popup_field[$module])
|
||||
{
|
||||
$js.='<script language="javascript">';
|
||||
foreach($popup_field[$module] as $field)
|
||||
{
|
||||
$exp=explode("||",$field['to_insert']);
|
||||
$value="";
|
||||
$values=array();
|
||||
foreach($exp as $e)
|
||||
{
|
||||
if($e!="" && $e=="id")$values[]=$id;
|
||||
elseif($e!="")$values[]=$_REQUEST[$e];
|
||||
}
|
||||
$value=implode(" ",$values);
|
||||
if($field['if_empty']==true)$js.='if(parent.opener.document.getElementById("'.$field['field'].'")=="")';
|
||||
$js.='parent.opener.document.getElementById("'.$field['field'].'").value="'.$value.'";
|
||||
';
|
||||
|
||||
}
|
||||
$js.='window.close();</script>';
|
||||
}
|
||||
return $js;
|
||||
}
|
||||
?>
|
||||
96
modules/EcmInsideOrders.cp/previewPDF.php
Executable file
96
modules/EcmInsideOrders.cp/previewPDF.php
Executable file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
$json = getJSONobj();
|
||||
$pll = array(); $i=0; while(isset($_POST['p_'.$i])) { $pll[] = $json->decode(htmlspecialchars_decode($_POST['p_'.$i])); $_POST['p_'.$i] = ''; $i++;}
|
||||
$_POST = $json->decode(htmlspecialchars_decode($_POST['otherFormData']));
|
||||
$_POST['position_list'] = $pll;
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $_REQUEST['cache'] != "fromJava") {
|
||||
|
||||
if(isset($_REQUEST['newWindow']) && $_REQUEST['newWindow'] == '1') {
|
||||
$_REQUEST['newWindow'] = 0;
|
||||
echo '<style type="text/css">html,body,div,table,p,ul,li,a,form,input,label{margin:0px; padding:0px;}</style>';
|
||||
echo "<iframe style='border:none;width:100%;height:100%;' frameborder='no' src='index.php?module=EcmInsideOrders&action=previewPDF&to_pdf=1&method=I&record=".$_GET['record']."#toolbar=0&zoom=80%'>Yours browser not accept iframes!</iframe>";
|
||||
} else {
|
||||
require_once("modules/EcmInsideOrders/EcmInsideOrder.php");
|
||||
$focus = new EcmInsideOrder();
|
||||
$method = (isset($_REQUEST['method']) && $_REQUEST['method'] != '') ? $_REQUEST['method'] : 'D';
|
||||
$focus->getPDF($_REQUEST['record'],$method);
|
||||
}
|
||||
} else
|
||||
|
||||
if($_REQUEST['cache'] == "fromJava" && $_GET['from']!="EcmInsideOrders") {
|
||||
|
||||
$_SESSION['PDF_ECMINSIDEORDERS'] = $_POST;
|
||||
|
||||
} else
|
||||
|
||||
if($_GET['from']=="EcmInsideOrders") {
|
||||
|
||||
|
||||
|
||||
require_once("modules/EcmInsideOrders/EcmInsideOrder.php");
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINSIDEORDERS']['record']) && $_SESSION['PDF_ECMINSIDEORDERS']['record'] != '') {
|
||||
|
||||
$focus->retrieve($_SESSION['PDF_ECMINSIDEORDERS']['record']);
|
||||
|
||||
}
|
||||
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
|
||||
ACLController::displayNoAccess(true);
|
||||
|
||||
sugar_cleanup(true);
|
||||
|
||||
}
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINSIDEORDERS'][$field])){
|
||||
|
||||
$value = $_SESSION['PDF_ECMINSIDEORDERS'][$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINSIDEORDERS'][$field])){
|
||||
|
||||
$value = $_SESSION['PDF_ECMINSIDEORDERS'][$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINSIDEORDERS']['to_is_vat_free']) && $_SESSION['PDF_ECMINSIDEORDERS']['to_is_vat_free']) $focus->to_is_vat_free = 1; else $focus->to_is_vat_free = 0;
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$pl = $_SESSION['PDF_ECMINSIDEORDERS']['position_list'];
|
||||
|
||||
$focus->position_list = $pl;
|
||||
|
||||
$focus->document_no = $_SESSION['PDF_ECMINSIDEORDERS']['document_no'];
|
||||
|
||||
$focus->ecmpaymentcondition_text = EcmInsideOrder::getTranslation('EcmPaymentConditions',$focus->ecmpaymentcondition_id,$focus->ecmlanguage);
|
||||
|
||||
$focus->ecmdeliverycondition_text = EcmInsideOrder::getTranslation('EcmDeliveryConditions',$focus->ecmdeliverycondition_id,$focus->ecmlanguage);
|
||||
|
||||
|
||||
|
||||
$focus->getPDF();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
159
modules/EcmInsideOrders.cp/saveProduction.php
Executable file
159
modules/EcmInsideOrders.cp/saveProduction.php
Executable file
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
include_once("modules/EcmSales/productionHelper.php");
|
||||
include_once("modules/EcmStockDocInsideOuts/EcmStockDocInsideOut.php");
|
||||
include_once("modules/EcmStockDocInsideIns/EcmStockDocInsideIn.php");
|
||||
if($_REQUEST['save_documents']){
|
||||
|
||||
$rdoc=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecminsideorders where id='".$_REQUEST['record']."'"));
|
||||
$json = getJSONobj();
|
||||
|
||||
$out=new EcmStockDocInsideOut();
|
||||
$out->name=$rdoc['document_no'];
|
||||
$out->assigned_user_id=$_SESSION['authenticated_user_id'];
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,name from ecmstocks where id='".$rdoc['rw_stock_id']."'"));
|
||||
$out->stock_id=$rdoc['rw_stock_id'];
|
||||
$out->stock_name=$r['name'];
|
||||
$out->ecmlanguage="pl_pl";
|
||||
$out->currency_id="PLN";
|
||||
$out->register_date=$GLOBALS['timedate']->to_display_date(date("Y-m-d"));
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,name from ecmdocumenttemplates where deleted='0' order by date_entered asc"));
|
||||
$out->template_id=$r['id'];
|
||||
$out->template_name=$r['name'];
|
||||
$out->status="accepted";
|
||||
if(count($_REQUEST['rw_id'])>0){
|
||||
for($i=0;$i<count($_REQUEST['rw_id']);$i++){
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select vat_id,vat_value,vat_name,name,code,id,product_category_id from ecmproducts where id='".$_REQUEST['rw_id'][$i]."'"));
|
||||
$return_array['id'] = $_REQUEST['rw_id'][$i];
|
||||
$return_array['guid'] = $_REQUEST['rw_guid'][$i];
|
||||
$return_array['position'] = $i;
|
||||
$return_array['code'] = $r['code'];
|
||||
$return_array['name'] = $r['name'];
|
||||
$return_array['quantity'] = ($_REQUEST['rw_quantity'][$i]);
|
||||
$return_array['price'] = round(($_REQUEST['rw_price'][$i]),2);
|
||||
$return_array['discount'] = 0;
|
||||
$return_array['total'] = round(($_REQUEST['rw_price'][$i]),2)*round(uN($_REQUEST['rw_quantity'][$i]),2);
|
||||
$return_array['unit_id'] = 1;
|
||||
$return_array['unit_name'] = "szt.";
|
||||
$return_array['vat_id'] = $r['vat_id'];
|
||||
$return_array['vat_name'] = $r['vat_name'];
|
||||
$return_array['vat_value'] = $r['vat_value'];
|
||||
$return_array['category_id'] = $r['product_category_id'];
|
||||
$return_array['currency_id'] = "PLN";
|
||||
$return_array['currency_name'] = "PLN";
|
||||
$rw_prod[]=$return_array;
|
||||
|
||||
}
|
||||
}
|
||||
$out->position_list=$rw_prod;
|
||||
$out_id=$out->save(true);
|
||||
$GLOBALS['db']->query("update ecminsideorders set rw_id='".$out_id."' where id='".$_REQUEST['record']."'");
|
||||
$out_link='<a href="index.php?module=EcmStockDocInsideOuts&action=DetailView&record='.$out_id.'">'.$out->document_no.'</a><br>';
|
||||
|
||||
$in=new EcmStockDocInsideIn();
|
||||
$in->name=$rdoc['document_no'];
|
||||
$in->assigned_user_id=$_SESSION['authenticated_user_id'];
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,name from ecmstocks where id='".$rdoc['pw_stock_id']."'"));
|
||||
$in->stock_id=$rdoc['pw_stock_id'];
|
||||
$in->stock_name=$r['name'];
|
||||
$in->ecmlanguage="pl_pl";
|
||||
$in->currency_id="PLN";
|
||||
$in->register_date=$GLOBALS['timedate']->to_display_date(date("Y-m-d"));
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,name from ecmdocumenttemplates where deleted='0' order by date_entered asc"));
|
||||
$in->template_id=$r['id'];
|
||||
$in->template_name=$r['name'];
|
||||
$in->status="accepted";
|
||||
|
||||
if(count($_REQUEST['pw_id'])>0){
|
||||
for($i=0;$i<count($_REQUEST['pw_id']);$i++){
|
||||
$wi=$GLOBALS['db']->query("select * from ecmstockdocinsideoutitems where guid='".$_REQUEST['pw_guid'][$i]."' and deleted='0'");
|
||||
$rqty=0;
|
||||
$rvalue=0;
|
||||
$rprice=0;
|
||||
while($rwi=$GLOBALS['db']->fetchByAssoc($wi)){
|
||||
$tmp = round(floatval($rwi['price']),2)*floatval($rwi['quantity']);
|
||||
$rvalue+=$tmp;
|
||||
//echo $rwi['price'].' - '.round(floatval($rwi['price']),2).' - '.floatval($rwi['quantity']).' - '.$tmp;
|
||||
//echo '<pre>';print_r($rwi);echo '</pre>';
|
||||
}
|
||||
/*while($rwi=$GLOBALS['db']->fetchByAssoc($wi)){
|
||||
$wo=$GLOBALS['db']->query("select sum(price*quantity) as sum from ecmstockoperations where documentitem_id='".$rwi['id']."'");
|
||||
$ro=$GLOBALS['db']->fetchByAssoc($wo);
|
||||
$rvalue+=$ro['sum'];
|
||||
|
||||
}*/
|
||||
if(floatval($_REQUEST['pw_quantity'][$i])>0)$rprice=$rvalue/floatval($_REQUEST['pw_quantity'][$i]);
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select vat_id,vat_value,vat_name,name,code,id,product_category_id from ecmproducts where id='".$_REQUEST['pw_id'][$i]."'"));
|
||||
$return_array['id'] = $_REQUEST['pw_id'][$i];
|
||||
$return_array['position'] = $i;
|
||||
$return_array['code'] = $r['code'];
|
||||
$return_array['name'] = $r['name'];
|
||||
$return_array['quantity'] = ($_REQUEST['pw_quantity'][$i]);
|
||||
$return_array['price'] = $rprice;
|
||||
$return_array['discount'] = 0;
|
||||
$return_array['total'] =$rvalue;
|
||||
$return_array['unit_id'] = 1;
|
||||
$return_array['unit_name'] = "szt.";
|
||||
$return_array['vat_id'] = $r['vat_id'];
|
||||
$return_array['vat_name'] = $r['vat_name'];
|
||||
$return_array['vat_value'] = $r['vat_value'];
|
||||
$return_array['category_id'] = $r['product_category_id'];
|
||||
$return_array['currency_id'] = "PLN";
|
||||
$return_array['currency_name'] = "PLN";
|
||||
$pw_prod[]=$return_array;
|
||||
}
|
||||
}
|
||||
$in->position_list=$pw_prod;
|
||||
$in_id=$in->save(true);
|
||||
$GLOBALS['db']->query("update ecminsideorders set pw_id='".$in_id."' where id='".$_REQUEST['record']."'");
|
||||
$in_link='<a href="index.php?module=EcmStockDocInsideIns&action=DetailView&record='.$in_id.'">'.$in->document_no.'</a><br>';
|
||||
$t.=$tbs;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.="Document No";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Description";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Inventory";
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.=$out_link;
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=$out->name;
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=$out->stock_name;
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.=$in_link;
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=$in->name;
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.=$in->stock_name;
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
$t.=$tbe;
|
||||
echo $t;
|
||||
$GLOBALS['db']->query("update ecminsideorders set status='accepted' where id='".$_REQUEST['record']."'");
|
||||
/*
|
||||
echo "<br><br>
|
||||
delete from ecmstockoperations where parent_id='$in_id';
|
||||
delete from ecmstockdocinsideinitems where ecmstockdocinsidein_id='$in_id';
|
||||
delete from ecmstockdocinsideins where id='$in_id';
|
||||
|
||||
delete from ecmstockoperations where parent_id='$out_id';
|
||||
delete from ecmstockdocinsideoutitems where ecmstockdocinsideout_id='$out_id';
|
||||
delete from ecmstockdocinsideouts where id='$out_id';
|
||||
";
|
||||
*/
|
||||
}
|
||||
//header("Location: index.php?module=EcmSales&action=ListProduction");
|
||||
?>
|
||||
39
modules/EcmInsideOrders.cp/subpanels.php
Executable file
39
modules/EcmInsideOrders.cp/subpanels.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
|
||||
|
||||
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
|
||||
|
||||
if(!isset($focus)) {
|
||||
|
||||
require_once('modules/EcmInsideOrders/EcmInsideOrder.php');
|
||||
|
||||
$focus = new EcmInsideOrder();
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
$focus->format_all_fields();
|
||||
|
||||
|
||||
}
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, "EcmInsideOrders");
|
||||
echo $subpanel->display();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
566
modules/EcmInsideOrders.cp/vardefs.php
Executable file
566
modules/EcmInsideOrders.cp/vardefs.php
Executable file
@@ -0,0 +1,566 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$dictionary['EcmInsideOrder'] = array (
|
||||
'table' => "ecminsideorders",
|
||||
'comment' => 'EcmInsideOrders',
|
||||
'duplicate_merge' => true,
|
||||
'unified_search' => true,
|
||||
|
||||
//FIELDS SECTION
|
||||
'fields' => array (
|
||||
|
||||
//STANDARD FIELDS SECTION
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'name',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => true,
|
||||
'comment' => 'The short description of the record contents',
|
||||
'massupdate' => true,
|
||||
'merge_filter' => 'selected',
|
||||
),
|
||||
'description' => array (
|
||||
'type' => 'text',
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'comment' => 'Description',
|
||||
'unified_search' => true,
|
||||
//'required' => true,
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record created'
|
||||
),
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record last modified'
|
||||
),
|
||||
'modified_user_id' => array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'required' => true,
|
||||
'reportable' => true,
|
||||
'comment' => 'User who last modified record'
|
||||
),
|
||||
'assigned_user_id' => array (
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_TO_ID',
|
||||
'group' => 'assigned_user_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'users',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'comment' => 'User ID assigned to record',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'created_by' => array (
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'created_by_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'comment' => 'User that created the record'
|
||||
),
|
||||
'created_by_link' => array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecminsideorders'.'_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'modified_user_link' => array (
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecminsideorders'.'_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'assigned_user_link' => array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecminsideorders'.'_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
'duplicate_merge' => 'enabled',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'table' => 'users',
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
|
||||
//NEW FIELDS SECTION
|
||||
'number' => array(
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '20',
|
||||
),
|
||||
'document_no' => array(
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '30',
|
||||
),
|
||||
'parent_name' => array(
|
||||
'name'=> 'parent_name',
|
||||
'id_name'=>'parent_id',
|
||||
'vname'=>'LBL_PARENT_NAME',
|
||||
'type'=>'relate',
|
||||
'group'=>'parent_name',
|
||||
'dbtype' => 'varchar',
|
||||
'len' => '255',
|
||||
//'source'=>'non-db',
|
||||
'module' => 'Accounts',
|
||||
'massupdate' => false,
|
||||
'required' => true,
|
||||
),
|
||||
'parent_id' => array (
|
||||
'name' => 'parent_id',
|
||||
'type' => 'id',
|
||||
'module' => 'Accounts',
|
||||
'vname' => 'LBL_PARENT_ID',
|
||||
'group'=>'parent_name',
|
||||
'massupdate' => false,
|
||||
'reportable'=>false,
|
||||
'required' => true,
|
||||
),
|
||||
'status' => array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'size' => '3',
|
||||
'options' => 'ecminsideorders_status_dom',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'type' => array (
|
||||
'name' => 'type',
|
||||
'vname' => 'LBL_TYPE',
|
||||
'type' => 'enum',
|
||||
'size' => '3',
|
||||
'options' => 'ecminsideorder_type_dom',
|
||||
'massupdate' => false,
|
||||
'required_option' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'employers' => array (
|
||||
'name' => 'employers',
|
||||
'vname' => 'LBL_EMPLOYERS',
|
||||
'type' => 'multienum',
|
||||
'size' => '3',
|
||||
'options' => 'ecminsideorders_employers_dom',
|
||||
'massupdate' => false,
|
||||
'isMultiSelect' => true,
|
||||
),
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => true,
|
||||
),
|
||||
'end_date' => array (
|
||||
'name' => 'end_date',
|
||||
'vname' => 'LBL_END_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
),
|
||||
'parent_name_copy' => array(
|
||||
'name' => 'parent_name_copy',
|
||||
'vname' => 'LBL_PARENT_NAME_COPY',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'parent_contact_name' => array (
|
||||
'name' => 'parent_contact_name',
|
||||
'vname' => 'LBL_PARENT_CONTACT_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_contact_title' => array (
|
||||
'name' => 'parent_contact_title',
|
||||
'vname' => 'LBL_PARENT_CONTACT_TITLE',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_address_street' => array (
|
||||
'name' => 'parent_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '150',
|
||||
'comment' => 'The street address used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_address_city' => array (
|
||||
'name' => 'parent_address_city',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_CITY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'comment' => 'The city used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_address_postalcode' => array (
|
||||
'name' => 'parent_address_postalcode',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '20',
|
||||
'group' => 'parent_address',
|
||||
'comment' => 'The postal code used for parent address',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_address_country' => array (
|
||||
'name' => 'parent_address_country',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
'type' => 'varchar',
|
||||
'group' => 'parent_address',
|
||||
'comment' => 'The country used for the parent address',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'subtotal' => array (
|
||||
'name' => 'subtotal',
|
||||
'vname' => 'LBL_SUBTOTAL',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
'required' => true,
|
||||
),
|
||||
'total' => array (
|
||||
'name' => 'total',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
'required' => true,
|
||||
),
|
||||
'ecmlanguage' => array(
|
||||
'name' => 'ecmlanguage',
|
||||
'vname' => 'LBL_ECMLANGUAGE',
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmlanguages_dom',
|
||||
'required' => true,
|
||||
'len' => 35,
|
||||
'massupdate' => false,
|
||||
),
|
||||
'to_is_vat_free' => array (
|
||||
'massupdate' => false,
|
||||
'name' => 'to_is_vat_free',
|
||||
'vname' => 'LBL_TO_IS_VAT_FREE',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
'comment' => 'Is vat free?',
|
||||
),
|
||||
'header_text' => array(
|
||||
'name' => 'header_text',
|
||||
'vname' => 'LBL_HEADER_TEXT',
|
||||
'type' => 'text',
|
||||
),
|
||||
'footer_text' => array(
|
||||
'name' => 'footer_text',
|
||||
'vname' => 'LBL_FOOTER_TEXT',
|
||||
'type' => 'text',
|
||||
),
|
||||
'ads_text' => array(
|
||||
'name' => 'ads_text',
|
||||
'vname' => 'LBL_ADS_TEXT',
|
||||
'type' => 'text',
|
||||
),
|
||||
'template_id' => array (
|
||||
'name' => 'template_id',
|
||||
'vname' => 'LBL_TEMPLATE_ID',
|
||||
'type' => 'id',
|
||||
'required_option' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'template_name' => array (
|
||||
'name' => 'template_name',
|
||||
'vname' => 'LBL_TEMPLATE_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'pw_stock_id' => array (
|
||||
'name' => 'pw_stock_id',
|
||||
'vname' => 'LBL_PW_STOCK_ID',
|
||||
'type' => 'id',
|
||||
'required_option' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'rw_stock_id' => array (
|
||||
'name' => 'rw_stock_id',
|
||||
'vname' => 'LBL_RW_STOCK_ID',
|
||||
'type' => 'id',
|
||||
'required_option' => true,
|
||||
'required' => true,
|
||||
),
|
||||
|
||||
'to_informations' => array(
|
||||
'name' => 'to_informations',
|
||||
'vname' => 'LBL_TO_INFORMATIONS',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'items_list_panel' => array(
|
||||
'name' => 'items_list_panel',
|
||||
'vname' => 'LBL_ITEMS',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'preview_panel' => array(
|
||||
'name' => 'preview_panel',
|
||||
'vname' => 'LBL_PREVIEW',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'email_panel' => array(
|
||||
'name' => 'email_panel',
|
||||
'vname' => 'LBL_EMAILS',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'currency_id' =>
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
'type' => 'enum',
|
||||
'options' => 'currency_dom',
|
||||
'label' => 'LBL_CURRENCY',
|
||||
),
|
||||
//FOR SUBPANELS
|
||||
|
||||
'account' => array (
|
||||
|
||||
'name' => 'account',
|
||||
|
||||
'type' => 'link',
|
||||
|
||||
'relationship' => 'ecminsideorders_account',
|
||||
|
||||
'source'=>'non-db',
|
||||
|
||||
'vname'=>'LBL_ACCOUNTS'
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'emails' => array (
|
||||
|
||||
'name' => 'emails',
|
||||
|
||||
'type' => 'link',
|
||||
|
||||
'relationship' => 'ecminsideorders_emails',
|
||||
|
||||
'source'=>'non-db',
|
||||
|
||||
'vname'=>'LBL_EMAILS'
|
||||
|
||||
), ),
|
||||
|
||||
|
||||
|
||||
//INDICES SECTION
|
||||
|
||||
'indices' => array (
|
||||
|
||||
|
||||
|
||||
array('name' => 'ecminsideorders'.'pk', 'type' => 'primary', 'fields' => array('id')),
|
||||
|
||||
|
||||
|
||||
array('name' => 'idx_'.'ecminsideorders'.'_name', 'type' => 'index', 'fields' => array('name'))
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//RELATIONSHIPS SECTION
|
||||
|
||||
'relationships' => array (
|
||||
|
||||
'ecminsideorders'.'_assigned_user' => array (
|
||||
|
||||
'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
|
||||
'rhs_module' => 'EcmInsideOrders', 'rhs_table' => 'ecminsideorders', 'rhs_key' => 'assigned_user_id',
|
||||
|
||||
'relationship_type' => 'one-to-many'
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'ecminsideorders'.'_modified_user' => array (
|
||||
|
||||
'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
|
||||
'rhs_module' => 'EcmInsideOrders', 'rhs_table' => 'ecminsideorders', 'rhs_key' => 'modified_user_id',
|
||||
|
||||
'relationship_type' => 'one-to-many'
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'ecminsideorders'.'_created_by' => array (
|
||||
|
||||
'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id',
|
||||
|
||||
'rhs_module' => 'EcmInsideOrders', 'rhs_table' => 'ecminsideorders', 'rhs_key' => 'created_by',
|
||||
|
||||
'relationship_type' => 'one-to-many'
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
||||
'ecminsideorders'.'_account' => array (
|
||||
|
||||
'lhs_module' => 'Accounts', 'lhs_table' => 'accounts', 'lhs_key' => 'id',
|
||||
|
||||
'rhs_module' => 'EcmInsideOrders', 'rhs_table' => 'ecminsideorders', 'rhs_key' => 'parent_id',
|
||||
|
||||
'relationship_type' => 'one-to-many'
|
||||
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
'optimistic_locking' => true,
|
||||
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
95
modules/EcmInsideOrders.cp/views/DetailView/view.detail.my.php
Executable file
95
modules/EcmInsideOrders.cp/views/DetailView/view.detail.my.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
/*
|
||||
* Created on Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/DetailView/DetailView2.php');
|
||||
|
||||
class ViewDetailMy extends SugarView{
|
||||
var $type ='detail';
|
||||
var $dv;
|
||||
var $tplFile = 'include/DetailView/DetailView.tpl';
|
||||
|
||||
function ViewDetailMy(){
|
||||
$this->options['show_subpanels'] = true;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/detailviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/detailviewdefs.php';
|
||||
}
|
||||
|
||||
$this->dv = new DetailView2();
|
||||
$this->dv->ss =& $this->ss;
|
||||
$this->dv->setup($this->module, $this->bean, $metadataFile, $this->tplFile);
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$this->dv->process();
|
||||
echo $this->dv->display();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
186
modules/EcmInsideOrders.cp/views/EditView/view.edit.ecminsideorders.php
Executable file
186
modules/EcmInsideOrders.cp/views/EditView/view.edit.ecminsideorders.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
* *******************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
* Created on Apr 13, 2007
|
||||
|
||||
*
|
||||
|
||||
* To change the template for this generated file go to
|
||||
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
|
||||
*/
|
||||
|
||||
require_once('include/EditView/EditView2.php');
|
||||
|
||||
|
||||
|
||||
class ViewEditEcmInsideOrders extends SugarView{
|
||||
|
||||
var $ev;
|
||||
|
||||
var $type ='edit';
|
||||
|
||||
var $useForSubpanel = false; //boolean variable to determine whether view can be used for subpanel creates
|
||||
|
||||
var $showTitle = true;
|
||||
|
||||
var $tplFile = 'include/EditView/EditView.tpl';
|
||||
|
||||
|
||||
|
||||
function ViewEditEcmInsideOrders(){
|
||||
|
||||
parent::SugarView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function preDisplay(){
|
||||
|
||||
$metadataFile = null;
|
||||
|
||||
$foundViewDefs = false;
|
||||
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/editviewdefs.php')){
|
||||
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/editviewdefs.php';
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}else{
|
||||
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}
|
||||
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/editviewdefs.php')){
|
||||
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/editviewdefs.php';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ev = new EditView();
|
||||
|
||||
$this->ev->ss =& $this->ss;
|
||||
|
||||
$this->ev->setup($this->module, $this->bean, $metadataFile, $this->tplFile);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function display(){
|
||||
|
||||
$this->ev->process();
|
||||
|
||||
echo $this->ev->display($this->showTitle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
238
modules/EcmInsideOrders.cp/views/view.list.php
Executable file
238
modules/EcmInsideOrders.cp/views/view.list.php
Executable file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Calls module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class EcmInsideOrdersViewList extends ViewList{
|
||||
|
||||
function EcmInsideOrdersViewList(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->module=$module = "EcmInsideOrders";
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $module. '/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$foundViewDefs && file_exists('modules/'.$module.'/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$module.'/metadata/listviewdefs.php';
|
||||
}
|
||||
require_once($metadataFile);
|
||||
|
||||
$storeQuery = new StoreQuery();
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$storeQuery->loadQuery($this->module);
|
||||
$storeQuery->populateRequest();
|
||||
}else{
|
||||
$storeQuery->saveFromRequest($this->module);
|
||||
}
|
||||
|
||||
$seed = $this->bean;
|
||||
$lv = new ListViewSmarty();
|
||||
$displayColumns = array();
|
||||
if(!empty($_REQUEST['displayColumns'])) {
|
||||
foreach(explode('|', $_REQUEST['displayColumns']) as $num => $col) {
|
||||
if(!empty($listViewDefs[$module][$col]))
|
||||
$displayColumns[$col] = $listViewDefs[$module][$col];
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($listViewDefs[$module] as $col => $params) {
|
||||
if(!empty($params['default']) && $params['default'])
|
||||
$displayColumns[$col] = $params;
|
||||
}
|
||||
}
|
||||
$params = array('massupdate' => true, 'export'=>false);
|
||||
|
||||
$lv->quickViewLinks = false;
|
||||
$lv->export = false;
|
||||
$lv->mergeduplicates = false;
|
||||
|
||||
if(!empty($_REQUEST['orderBy'])) {
|
||||
$params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
|
||||
$lv->displayColumns = $displayColumns;
|
||||
|
||||
$this->seed = $seed;
|
||||
$this->module = $module;
|
||||
|
||||
$searchForm = null;
|
||||
|
||||
//search
|
||||
$view = 'basic_search';
|
||||
if(!empty($_REQUEST['search_form_view']))
|
||||
$view = $_REQUEST['search_form_view'];
|
||||
$headers = true;
|
||||
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only'])
|
||||
$headers = false;
|
||||
elseif(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$view = 'advanced_search';
|
||||
}else {
|
||||
$view = 'basic_search';
|
||||
}
|
||||
}
|
||||
|
||||
$use_old_search = true;
|
||||
if(file_exists('modules/'.$this->module.'/SearchForm.html')){
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
$searchForm = new SearchForm($this->module, $this->seed);
|
||||
}else{
|
||||
$use_old_search = false;
|
||||
require_once('include/SearchForm/SearchForm2.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchdefs']))
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
|
||||
if (file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
elseif (!empty($metafiles[$this->module]['searchdefs']))
|
||||
{
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
}
|
||||
elseif (file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchfields']))
|
||||
require_once($metafiles[$this->module]['searchfields']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/SearchFields.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/SearchFields.php');
|
||||
|
||||
$searchForm = new SearchForm($this->seed, $this->module, $this->action);
|
||||
$searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $listViewDefs);
|
||||
|
||||
$searchForm->lv = $lv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($this->options['show_title']) && $this->options['show_title'] && (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true")) {
|
||||
$moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME'];
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($moduleName, $GLOBALS['mod_strings']['LBL_MODULE_TITLE'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
}
|
||||
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
// we have a query
|
||||
if(!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) { // from EditView cancel
|
||||
$searchForm->populateFromArray($storeQuery->query);
|
||||
}
|
||||
else {
|
||||
$searchForm->populateFromRequest();
|
||||
}
|
||||
$where_clauses = $searchForm->generateSearchWhere(true, $this->seed->module_dir);
|
||||
if (count($where_clauses) > 0 )$where = '('. implode(' ) AND ( ', $where_clauses) . ')';
|
||||
$GLOBALS['log']->info("List View Where Clause: $where");
|
||||
}
|
||||
if($use_old_search){
|
||||
switch($view) {
|
||||
case 'basic_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayBasic($headers);
|
||||
break;
|
||||
case 'advanced_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayAdvanced($headers);
|
||||
break;
|
||||
case 'saved_views':
|
||||
echo $searchForm->displaySavedViews($listViewDefs, $lv, $headers);
|
||||
break;
|
||||
}
|
||||
|
||||
}else{
|
||||
echo $searchForm->display($headers);
|
||||
}
|
||||
if(!$headers)
|
||||
return;
|
||||
|
||||
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
|
||||
//$this->processQuickSearch();
|
||||
$lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where, $params);
|
||||
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
|
||||
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
|
||||
echo $lv->display();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user