Add php files
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
<?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['MyEcmQuotesDashlet']['searchFields'] = array('name' => array('default' => ''),
|
||||
'date_entered' => array('default' => ''),
|
||||
'status' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyEcmQuotesDashlet']['columns'] = array(
|
||||
'STATUS' => array(
|
||||
'width' => '1',
|
||||
'label' => ' ',
|
||||
'default' => 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=EcmQuotes&action=EditView&record={$ID}">{$NAME}</a>',
|
||||
'default' => true,
|
||||
),
|
||||
'REGISTER_DATE'=>array(
|
||||
'width'=>15,
|
||||
'label'=>'LBL_REGISTER_DATE',
|
||||
'default'=>true,
|
||||
'sortable'=>true,
|
||||
),
|
||||
'PARENT_ID'=>array(
|
||||
'width'=>0,
|
||||
'label'=>' ',
|
||||
'customCode'=>' ',
|
||||
'default'=>true,
|
||||
'sortable'=>false,
|
||||
),
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_PARENT_NAME',
|
||||
'default' => true,
|
||||
'id'=>'PARENT_ID',
|
||||
'module'=>'Accounts',
|
||||
'link'=>true,
|
||||
),
|
||||
'TOTAL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_TOTAL',
|
||||
'default' => true,
|
||||
'align' => 'left',
|
||||
),
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
),
|
||||
'OPTIONS' => array(
|
||||
'width' => '5',
|
||||
'label' => ' ',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'right',
|
||||
),
|
||||
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
|
||||
|
||||
);
|
||||
|
||||
k
|
||||
?>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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['MyEcmQuotesDashlet'] = array('module' => 'EcmQuotes',
|
||||
'title' => translate('LBL_DASHLET_MY_ECMQUOTES', 'EcmQuotes'),
|
||||
'description' => 'A customizable view into Quotes',
|
||||
'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/EcmQuotes/EcmQuote.php');
|
||||
|
||||
class MyEcmQuotesDashlet extends DashletGeneric {
|
||||
function MyEcmQuotesDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/EcmQuotes/Dashlets/MyEcmQuotesDashlet/MyEcmQuotesDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_DASHLET_MY_ECMQUOTES', 'EcmQuotes');
|
||||
|
||||
$this->searchFields = $dashletData['MyEcmQuotesDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyEcmQuotesDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new EcmQuote();
|
||||
$this->lvs->quickViewLinks = false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?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['MyEcmStockDocCorrectsDashlet']['searchFields'] = array('name' => array('default' => ''),
|
||||
'date_entered' => array('default' => ''),
|
||||
'status' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyEcmStockDocCorrectsDashlet']['columns'] = array(
|
||||
'STATUS' => array(
|
||||
'width' => '1',
|
||||
'label' => ' ',
|
||||
'default' => 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=EcmStockDocCorrects&action=EditView&record={$ID}">{$NAME}</a>',
|
||||
'default' => true,
|
||||
),
|
||||
'REGISTER_DATE'=>array(
|
||||
'width'=>15,
|
||||
'label'=>'LBL_REGISTER_DATE',
|
||||
'default'=>true,
|
||||
'sortable'=>true,
|
||||
),
|
||||
'TOTAL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_TOTAL',
|
||||
'default' => true,
|
||||
'align' => 'left',
|
||||
),
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
),
|
||||
'OPTIONS' => array(
|
||||
'width' => '5',
|
||||
'label' => ' ',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'right',
|
||||
),
|
||||
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
|
||||
|
||||
);
|
||||
|
||||
k
|
||||
?>
|
||||
@@ -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['MyEcmStockDocCorrectsDashlet'] = array('module' => 'EcmStockDocCorrects',
|
||||
'title' => translate('LBL_DASHLET_MY_ECMQUOTES', 'EcmStockDocCorrects'),
|
||||
'description' => 'A customizable view into Quotes',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
@@ -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/EcmStockDocCorrects/EcmStockDocCorrect.php');
|
||||
|
||||
class MyEcmStockDocCorrectsDashlet extends DashletGeneric {
|
||||
function MyEcmStockDocCorrectsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/EcmStockDocCorrects/Dashlets/MyEcmStockDocCorrectsDashlet/MyEcmStockDocCorrectsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_DASHLET_MY_ECMQUOTES', 'EcmStockDocCorrects');
|
||||
|
||||
$this->searchFields = $dashletData['MyEcmStockDocCorrectsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyEcmStockDocCorrectsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new EcmStockDocCorrect();
|
||||
$this->lvs->quickViewLinks = false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
60
modules/EcmStockDocCorrects/DetailView.php
Executable file
60
modules/EcmStockDocCorrects/DetailView.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?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/EcmStockDocCorrects/EcmStockDocCorrect.php');
|
||||
require_once ('include/time.php');
|
||||
require_once ('include/json_config.php');
|
||||
echo '<script type="text/javascript" src="include/ECM/SearchProductTable.js"></script>';
|
||||
$json_config = new json_config ();
|
||||
|
||||
$focus = new EcmStockDocCorrect ();
|
||||
|
||||
if (isset ( $_REQUEST ['record'] )) {
|
||||
$focus->retrieve ( $_REQUEST ['record'] );
|
||||
$focus->format_all_fields ();
|
||||
$OPT ['status'] = $focus->status;
|
||||
}
|
||||
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
require_once ('modules/EcmStockDocCorrects/views/DetailView/view.detail.my.php');
|
||||
$edit = new ViewDetailMy ();
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
$edit->module = 'EcmStockDocCorrects';
|
||||
|
||||
// add pdf buttons
|
||||
//$btn = '<input title="Generuj PDF" class="button" onclick="if($(\'#div_pdf\').css(\'display\') == \'none\'){$(\'#div_pdf\').show(\'slow\'); } else { $(\'#div_pdf\').hide(\'slow\'); }" type="button" name="productcard" id="productcard" value="Generuj PDF">';
|
||||
//$btn .= '<div id="div_pdf" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
//$btn .= 'Typ: <select name="pdf_type" id="pdf_type"><option value="1">Dokument</option><option value="0">Operacje magazynowe</option></select><br /><br />';
|
||||
$btn .= '<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.open(\'index.php?module=EcmStockDocCorrects&action=createPDF&to_pdf=1&pdf_type=\'+$(\'#pdf_type\').val()+\'&record=' . $_REQUEST ['record'] . '\',\'_blank\');" type="button" value="Pokaż PDF"></div>';
|
||||
$edit->ss->assign ( "CREATE_PDF", $btn );
|
||||
|
||||
$can_edit = false;
|
||||
global $current_user;
|
||||
|
||||
//get operations
|
||||
$db = $GLOBALS['db'];
|
||||
$out = $db->fetchByAssoc($db->query("SELECT sum(round(price*quantity,2)) as sum FROM ecmstockoperations WHERE type='1' AND parent_id='".$focus->id."'"));
|
||||
$edit->ss->assign("OP_OUT", format_number($out['sum']));
|
||||
$in = $db->fetchByAssoc($db->query("SELECT sum(round(price*quantity,2)) as sum FROM ecmstockoperations WHERE type='0' AND parent_id='".$focus->id."'"));
|
||||
$edit->ss->assign("OP_IN", format_number($in['sum']));
|
||||
|
||||
$edit->ss->assign ( "CREATED_BY_NAME", $focus->created_by_name );
|
||||
$edit->ss->assign ( "MODIFIED_BY_NAME", $focus->modified_by_name );
|
||||
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl';
|
||||
|
||||
$edit->preDisplay ();
|
||||
echo $edit->display ();
|
||||
|
||||
require_once ('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles ( $focus, 'EcmStockDocCorrects' );
|
||||
echo $subpanel->display ();
|
||||
// loading view
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmStockDocCorrects/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
?>
|
||||
883
modules/EcmStockDocCorrects/EcmStockDocCorrect.php
Executable file
883
modules/EcmStockDocCorrects/EcmStockDocCorrect.php
Executable file
@@ -0,0 +1,883 @@
|
||||
<?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 ('data/SugarBean.php');
|
||||
require_once ('include/utils.php');
|
||||
class EcmStockDocCorrect extends SugarBean {
|
||||
var $field_name_map = array ();
|
||||
// STANDARD FIELDS
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $name;
|
||||
var $description;
|
||||
var $number;
|
||||
var $document_no;
|
||||
var $register_date;
|
||||
var $total;
|
||||
var $position_list;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $assigned_user_name;
|
||||
var $stock_id;
|
||||
// SUBPANELS RELATED
|
||||
// MODULE OBJECT DETAILS
|
||||
var $module_dir = "EcmStockDocCorrects";
|
||||
var $table_name = "ecmstockdoccorrects";
|
||||
var $object_name = "EcmStockDocCorrect";
|
||||
// RELATED TABLE NAMES
|
||||
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
|
||||
var $additional_column_fields = Array (
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
'modified_user_id',
|
||||
'created_by'
|
||||
);
|
||||
// RELATIONSHIP FIELDS
|
||||
var $relationship_fields = Array (
|
||||
'note_id' => 'notes'
|
||||
);
|
||||
function EcmStockDocCorrect() {
|
||||
parent::SugarBean ();
|
||||
$this->setupCustomFields ( 'EcmStockDocCorrects' );
|
||||
foreach ( $this->field_defs as $field ) {
|
||||
$this->field_name_map [$field ['name']] = $field;
|
||||
}
|
||||
}
|
||||
var $new_schema = true;
|
||||
function get_summary_text() {
|
||||
return "$this->name";
|
||||
}
|
||||
function create_list_query($order_by, $where, $show_deleted = 0) {
|
||||
// Fill in the assigned_user_name
|
||||
$custom_join = $this->custom_fields->getJOIN ();
|
||||
$query = "SELECT ";
|
||||
$query .= "ecmstockdoccorrects.*
|
||||
,users.user_name as assigned_user_name";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['select'];
|
||||
}
|
||||
$query .= " FROM ecmstockdoccorrects
|
||||
LEFT JOIN users
|
||||
ON ecmstockdoccorrects.assigned_user_id=users.id";
|
||||
$query .= " ";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if ($show_deleted == 0) {
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
} else if ($show_deleted == 1) {
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
if ($where != "")
|
||||
$query .= "where $where AND " . $where_auto;
|
||||
else
|
||||
$query .= "where " . $where_auto;
|
||||
if (substr_count ( $order_by, '.' ) > 0) {
|
||||
$query .= " ORDER BY $order_by";
|
||||
} else if ($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY ecmstockdoccorrects.name";
|
||||
return $query;
|
||||
}
|
||||
function create_export_query($order_by, $where) {
|
||||
$custom_join = $this->custom_fields->getJOIN ();
|
||||
$query = "SELECT
|
||||
ecmstockdoccorrects.*,
|
||||
users.user_name assigned_user_name";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['select'];
|
||||
}
|
||||
$query .= " FROM ecmstockdoccorrects ";
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmstockdoccorrects.assigned_user_id=users.id";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['join'];
|
||||
}
|
||||
$query .= "";
|
||||
$where_auto = " ecmstockdoccorrects.deleted=0
|
||||
";
|
||||
if ($where != "")
|
||||
$query .= " where $where AND " . $where_auto;
|
||||
else
|
||||
$query .= " where " . $where_auto;
|
||||
if ($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY ecmstockdoccorrects.name";
|
||||
return $query;
|
||||
}
|
||||
function fill_in_additional_list_fields() {
|
||||
}
|
||||
function fill_in_additional_detail_fields() {
|
||||
// FILL IN THE ASSIGNED_USER_NAME
|
||||
$this->assigned_user_name = get_assigned_user_name ( $this->assigned_user_id );
|
||||
$this->created_by_name = get_assigned_user_name ( $this->created_by );
|
||||
$this->modified_by_name = get_assigned_user_name ( $this->modified_user_id );
|
||||
}
|
||||
function get_list_view_data() {
|
||||
global $current_language;
|
||||
$this->fill_in_additional_detail_fields ();
|
||||
$app_list_strings = return_app_list_strings_language ( $current_language );
|
||||
$mod_strings = return_module_language ( $current_language, 'EcmStockDocCorrects' );
|
||||
$the_array = parent::get_list_view_data ();
|
||||
// get stocks
|
||||
if($this->ecmproduct_id!=''){
|
||||
//add subpanel data
|
||||
$tmp=$this->getPriceFromDocument($this->ecmproduct_id);
|
||||
|
||||
$the_array ['QUANTITY'] = format_number ( $tmp['quantity'] );
|
||||
$the_array ['PRICE_NETTO'] = format_number ( $tmp['price_netto'] );
|
||||
$the_array ['TOTAL_NETTO'] = $tmp['total_netto'] ;
|
||||
}
|
||||
$this->retrieve ( $this->id );
|
||||
$the_array['DOCUMENT_AUTOINCREMENT']=date('d.m.Y',strtotime($this->register_date));
|
||||
|
||||
$the_array ['STOCK_NAME'] = $this->stock_name;
|
||||
$the_array ['NUMBER'] = '<a href="index.php?module=EcmStockDocCorrects&action=DetailView&record=' . $this->id . '&offset=1">' . $this->document_no . '</a>';
|
||||
// create image options
|
||||
$op = '<a href="index.php?module=EcmStockDocCorrects&action=createPDF&to_pdf=1&record=' . $this->id . '" target="new"/><img src="modules/EcmStockDocCorrects/images/pdf.gif"/></a>';
|
||||
$the_array ['OPTIONS'] = $op;
|
||||
|
||||
return $the_array;
|
||||
}
|
||||
function getPriceFromDocument($product){
|
||||
$zap=$this->db->query("select quantity,price,total from ecmstockdoccorrectitems where id='".$product."'");
|
||||
$dane=$this->db->fetchByAssoc($zap);
|
||||
return $dane;
|
||||
}
|
||||
function getStatusMenuInfo($inJSON = true) {
|
||||
global $app_list_strings;
|
||||
$arr = array ();
|
||||
foreach ( $app_list_strings ['ecmstockdoccorrects_status_dom'] as $key => $value ) {
|
||||
$arr [$key] = array (
|
||||
'enabled' => '<div><img src="modules/EcmStockDocCorrects/images/' . $key . '.gif" />' . $value . '</div>',
|
||||
'disabled' => '<div><img src="modules/EcmStockDocCorrects/images/' . $key . '.gif" />' . $value . '</div>'
|
||||
);
|
||||
}
|
||||
$json = getJSONobj ();
|
||||
if ($inJSON)
|
||||
return str_replace ( '"', '\"', $json->encode ( $arr ) );
|
||||
else
|
||||
return $arr;
|
||||
}
|
||||
function create_new_list_query($order_by, $where, $filter = array(), $params = array(), $show_deleted = 0, $join_type = '', $return_array = false, $parentbean, $singleSelect = false) {
|
||||
echo '<script type="text/javascript" src="include/ECM/EcmPreviewPDF/EcmPreviewPDF.js"></script>';
|
||||
echo '<script language="javascript"> var EcmStockDocCorrectsStatusMenu = ' . $this->getStatusMenuInfo () . '; </script>';
|
||||
return parent::create_new_list_query ( $order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect );
|
||||
}
|
||||
static function CreateImgStatus($id, $status) {
|
||||
global $app_list_strings;
|
||||
return '<span id="statusListEcmStockDocCorrect_' . $id . '" style="display:inline;"><img src="modules/EcmStockDocCorrects/images/' . $status . '.gif" title="' . $app_list_strings ['ecmstockdoccorrects_status_dom'] [$status] . '" /></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* BUILDS A GENERIC SEARCH BASED ON THE QUERY STRING USING OR.
|
||||
* DO NOT INCLUDE ANY $THIS-> BECAUSE THIS IS CALLED ON WITHOUT HAVING THE CLASS INSTANTIATED.
|
||||
*/
|
||||
function build_generic_where_clause($the_query_string) {
|
||||
$where_clauses = Array ();
|
||||
$the_query_string = PearDatabase::quote ( from_html ( $the_query_string ) );
|
||||
array_push ( $where_clauses, "ecmstockdoccorrects.name like '$the_query_string%'" );
|
||||
$the_where = "";
|
||||
foreach ( $where_clauses as $clause ) {
|
||||
if ($the_where != "")
|
||||
$the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
return $the_where;
|
||||
}
|
||||
function set_notification_body($xtpl, $simplemodule) {
|
||||
global $mod_strings, $app_list_strings;
|
||||
$xtpl->assign ( "NAME", $simplemodule->name );
|
||||
$xtpl->assign ( "DESCRIPTION", $simplemodule->description );
|
||||
return $xtpl;
|
||||
}
|
||||
function bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL' :
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function save($check_notify = FALSE) {
|
||||
global $current_user;
|
||||
// generate number
|
||||
require_once('modules/EcmSysInfos/EcmSysInfo.php');
|
||||
$EcmSysInfo = new EcmSysInfo();
|
||||
$template = $EcmSysInfo->getFormatNumberForModule('EcmStockDocCorrects');
|
||||
|
||||
unset($EcmSysInfo);
|
||||
if ($template != "") {
|
||||
if ($template != "") {
|
||||
require_once('include/ECM/EcmDocumentNumberGenerator/EcmDocumentNumberGenerator.inc.php');
|
||||
$dng = new EcmDocumentNumberGenerator('EcmStockDocCorrects',$this->register_date);
|
||||
$this->document_no= $dng->parseNumber($template, $this->stock_id);
|
||||
}
|
||||
}
|
||||
$aa=explode('/',$this->document_no);
|
||||
$this->document_autoincrement=date("Ymd",strtotime($this->register_date)).''.sprintf('%03d',(string)((int)$aa[0]));
|
||||
|
||||
$return_id = parent::save ( $check_notify );
|
||||
$this->savePositions ( $return_id );
|
||||
|
||||
// update total
|
||||
$db = $GLOBALS ['db'];
|
||||
$vat_total = 0;
|
||||
// add round total 21.08.2014 DB
|
||||
if ($this->type!='6ed5b076-ddd1-9809-b236-54e5b2bcbd97')
|
||||
$r = $db->fetchByAssoc ( $db->query ( "SELECT sum(total) as sum FROM ecmstockdoccorrectitems WHERE ecmstockdoccorrect_id='$this->id' and deleted='0'" ) );
|
||||
else
|
||||
$r = $db->fetchByAssoc ( $db->query ( "SELECT sum(total_diff) as sum FROM ecmstockdoccorrectitems WHERE ecmstockdoccorrect_id='$this->id' and deleted='0'" ) );
|
||||
|
||||
$db->query ( "UPDATE ecmstockdoccorrects SET total='" . round ( $r ['sum'], 2 ) . "' WHERE id='$this->id'" );
|
||||
|
||||
return $return_id;
|
||||
}
|
||||
// ***************************Start Managing Positions*************************//
|
||||
function constructInsertQuery($data, $table = '') {
|
||||
if ($table == '' && isset ( $this->object_name ) && $this->object_name != '') {
|
||||
$table = strtolower ( $this->object_name ) . "items";
|
||||
} else
|
||||
return "";
|
||||
$keys = array ();
|
||||
$values = array ();
|
||||
foreach ( $data as $key => $value ) {
|
||||
$keys [] = $key;
|
||||
if (is_array ( $value ))
|
||||
$values [] = $value [1] . str_replace ( "'", "\'", $value [0] ) . $value [1];
|
||||
else
|
||||
$values [] = "'" . str_replace ( "'", "\'", $value ) . "'";
|
||||
}
|
||||
$q = "insert into `$table` (`";
|
||||
$q .= implode ( '`, `', $keys );
|
||||
$q .= "`) values (";
|
||||
$q .= implode ( ", ", $values );
|
||||
$q .= ");";
|
||||
|
||||
$GLOBALS ['db']->query ( "INSERT INTO log VALUES ('" . mysql_real_escape_string ( $q ) . "')" );
|
||||
return $q;
|
||||
}
|
||||
function savePositions($id = null, $position_list = null) {
|
||||
global $current_user, $timedate;
|
||||
if ($position_list == null)
|
||||
$position_list = $this->position_list;
|
||||
if ($id == null)
|
||||
$id = $this->id;
|
||||
if (count ( $position_list ) > 0)
|
||||
$this->deleteAssignedPositions ( $id );
|
||||
$arr = array ();
|
||||
$position = 0;
|
||||
|
||||
for($i = 0; $i < count ( $position_list ); $i ++) {
|
||||
if ($position_list [$i] ['name'] == '')
|
||||
continue;
|
||||
$p = $position_list [$i];
|
||||
|
||||
|
||||
require_once ("modules/EcmProducts/EcmProduct.php");
|
||||
$pr = new EcmProduct ();
|
||||
$pr->retrieve ( $p ['product_id'] );
|
||||
$p ['category_id'] = $pr->product_category_id;
|
||||
unset ( $pr );
|
||||
$item_id = create_guid ();
|
||||
$p ['id'] = $p ['product_id'];
|
||||
$arr = array (
|
||||
'id' => $item_id,
|
||||
'date_entered' => array (
|
||||
'NOW()',
|
||||
''
|
||||
),
|
||||
'date_modified' => array (
|
||||
'NOW()',
|
||||
''
|
||||
),
|
||||
'modified_user_id' => $current_user->id,
|
||||
'assigned_user_id' => $current_user->id,
|
||||
'created_by' => $current_user->id,
|
||||
'deleted' => '0',
|
||||
strtolower ( $this->object_name ) . '_id' => $id,
|
||||
'ecmproduct_id' => $p ['product_id'],
|
||||
'position' => $position,
|
||||
'code' => $p ['product_code'],
|
||||
'name' => $p ['name'],
|
||||
'price' => ((empty ( $p ['price'] ) || $p ['price'] == '') ? 0 : $p ['price']),
|
||||
'quantity' => ((empty ( $p ['quantity'] ) || $p ['quantity'] == '') ? 0 : $p ['quantity']),
|
||||
'dd_unit_id' => $p ['unit_id'],
|
||||
'dd_unit_name' => $p ['unit_name'],
|
||||
'ecmproductcategory_id' => $p ['category_id'],
|
||||
'ecmstockoperation_id' => $p ['product_consignment_id'],
|
||||
'is_consignment' => $p['product_is_consignment'],
|
||||
'old_price' => $p['price_old'],
|
||||
|
||||
);
|
||||
$GLOBALS['db']->query("INSERT INTO log VALUES ('".mysql_real_escape_string($query)."')");
|
||||
$this->db->query ( $this->constructInsertQuery ( $arr ) );
|
||||
// stock operations
|
||||
if ($this->type == '6ed5b076-ddd1-9809-b236-54e5b2bcbd97') { //discount
|
||||
$p ['quantity'] *= - 1;
|
||||
$this->deleteProductsFromStockWithConsignment ( $p, $id, $item_id ); //delete
|
||||
$p ['quantity'] *= - 1;
|
||||
$this->insertProductsToStock ( $p, $id, $this->stock_id, $item_id); // add
|
||||
//calculate total
|
||||
$GLOBALS['db']->query("UPDATE ecmstockdoccorrectitems SET old_total=ROUND(quantity*old_price,2) WHERE id = '$item_id'");
|
||||
$GLOBALS['db']->query("UPDATE ecmstockdoccorrectitems SET total_diff=total-old_total WHERE id = '$item_id'");
|
||||
} else { //normal operations
|
||||
if ($p ['quantity'] < 0) {
|
||||
if (! $p ['product_consignment_id'] || $p ['product_consignment_id'] == ""){
|
||||
$this->deleteProductsFromStock ( $p, $id, $item_id );
|
||||
}else{
|
||||
$this->deleteProductsFromStockWithConsignment ( $p, $id, $item_id );
|
||||
}
|
||||
} elseif ($p ['quantity'] > 0)
|
||||
$this->insertProductsToStock ( $p, $id, $this->stock_id, $item_id);
|
||||
}
|
||||
$position ++;
|
||||
}
|
||||
}
|
||||
function insertProductsToStock($pl, $return_id, $stock_id, $itemid) {
|
||||
global $app_list_strings;
|
||||
$pp = 0;
|
||||
$qq = 0;
|
||||
$w = $GLOBALS ['db']->query ( "select price,quantity from ecmstockoperations where deleted='0' and type='0' and stock_id='" . $stock_id . "' and product_id='" . $pl ['id'] . "' ORDER BY counter ASC" );
|
||||
while ( $rrr = $GLOBALS ['db']->fetchByAssoc ( $w ) ) {
|
||||
if ($rrr ['quantity'] > 0) {
|
||||
$pp += ( float ) $rrr ['price'] * ( int ) $rrr ['quantity'];
|
||||
$qq += ( int ) $rrr ['quantity'];
|
||||
}
|
||||
}
|
||||
if ($_REQUEST ['so_id']) {
|
||||
$pp = 0;
|
||||
$qq = 0;
|
||||
$r_cor_inv = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "select ecminvoiceout_id from ecminvoiceouts where id='" . $_REQUEST ['so_id'] . "'" ) );
|
||||
$r_inv = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "select wz_id from ecminvoiceouts where id='" . $r_cor_inv ['ecminvoiceout_id'] . "'" ) );
|
||||
$w_wz = $GLOBALS ['db']->query ( "select price,quantity from ecmstockoperations where parent_id='" . $r_inv ['wz_id'] . "' and product_id='" . $pl ['id'] . "' ORDER BY counter ASC" );
|
||||
while ( $r_wz = $GLOBALS ['db']->fetchByAssoc ( $w_wz ) ) {
|
||||
$pp += ( float ) $r_wz ['price'] * ( float ) $r_wz ['quantity'];
|
||||
$qq += ( int ) $r_wz ['quantity'];
|
||||
}
|
||||
if (! $pp) {
|
||||
$w_it = $GLOBALS ['db']->query ( "select purchase_price,quantity from ecminvoiceoutitems where ecminvoiceout_id='" . $r_cor_inv ['ecminvoiceout_id'] . "' and ecmproduct_id='" . $pl ['id'] . "'" );
|
||||
while ( $r_it = $GLOBALS ['db']->fetchByAssoc ( $w_it ) ) {
|
||||
$pp += ( float ) $r_it ['purchase_price'] * ( float ) $r_it ['quantity'];
|
||||
$qq += ( int ) $r_it ['quantity'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once ("modules/EcmStockOperations/EcmStockOperation.php");
|
||||
$o = new EcmStockOperation ();
|
||||
|
||||
require_once ("modules/EcmProducts/EcmProduct.php");
|
||||
$o->product_id = $pl ['id'];
|
||||
$p = new EcmProduct ();
|
||||
$p->retrieve ( $pl ['id'] );
|
||||
$o->product_code = $p->code;
|
||||
$o->product_name = $p->name;
|
||||
|
||||
require_once ("modules/EcmStocks/EcmStock.php");
|
||||
$o->stock_id = $stock_id;
|
||||
$s = new EcmStock ();
|
||||
$s->retrieve ( $stock_id );
|
||||
$o->stock_name = $s->name;
|
||||
if ($pl['product_is_consignment'] == '1'){
|
||||
$o->part_no = $pl['product_consignment_part'];
|
||||
} else {
|
||||
if($p->is_consignment==1){
|
||||
$o->part_no=$this->description;
|
||||
}
|
||||
}
|
||||
$o->parent_id = $return_id;
|
||||
$r = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "select document_no from ecmstockdoccorrects where id='" . $return_id . "'" ) );
|
||||
$o->parent_name = $r ['document_no'];
|
||||
$o->parent_type = "EcmStockDocCorrects";
|
||||
|
||||
$o->quantity = round($pl['quantity'],$app_list_strings['ecmproducts_unit_dom_precision'][$pl ['unit_id']]);
|
||||
if ($pl ['price'])
|
||||
$price = $pl ['price'];
|
||||
else
|
||||
$price = $pp / $qq;
|
||||
$o->price = $price;
|
||||
$o->documentitem_id = $itemid;
|
||||
$o->type = 0;
|
||||
$oid = $o->save ();
|
||||
$GLOBALS ['db']->query ( "update ecmstockoperations set price='" . $price . "' where id='" . $oid . "'" );
|
||||
$GLOBALS ['db']->query ( "update ecmstockdoccorrectitems set total='" . ($pl ['quantity'] * $price) . "',price='" . ($price) . "' where id='" . $itemid . "'" );
|
||||
require_once ("modules/EcmStockStates/EcmStockState.php");
|
||||
$ss = new EcmStockState ();
|
||||
$ss->UpdateStockState ( $o->stock_id, $o->product_id );
|
||||
}
|
||||
function deleteProductsFromStockWithConsignment($p, $id, $itemid) {
|
||||
$p ['quantity'] *= - 1;
|
||||
$db = $GLOBALS ['db'];
|
||||
$in_p = $db->fetchByAssoc ( $db->query ( "SELECT price FROM ecmstockoperations WHERE id = '" . $p ['product_consignment_id'] . "'" ) );
|
||||
$this->addProductToStockOut ( $p ['product_consignment_id'], $p ['id'], $p ['quantity'], $in_p ['price'], $this->register_date, $id, $this->stock_id, $itemid );
|
||||
$db->query ( "update ecmstockdoccorrectitems set total='-" . round ( $p ['quantity'] * $in_p ['price'], 2 ) . "',price='" . $in_p ['price'] . "' where id='" . $itemid . "'" );
|
||||
}
|
||||
function deleteProductsFromStock($p, $id, $itemid) {
|
||||
$p ['quantity'] *= - 1;
|
||||
$arr = array ();
|
||||
$w = $GLOBALS ['db']->query ( "select quantity as qty,id,price from ecmstockoperations where deleted='0' and type='0' and in_id IS NULL and stock_id='" . $this->stock_id . "' and product_id='" . $p ['id'] . "' ORDER BY counter ASC" );
|
||||
$GLOBALS ['db']->query ( "INSERT INTO log VALUES ('s:" . $this->stock_id . " p:" . $p ['id'] . "')" );
|
||||
while ( $rrr = $GLOBALS ['db']->fetchByAssoc ( $w ) ) {
|
||||
$ww = $GLOBALS ['db']->query ( "select quantity from ecmstockoperations where in_id='" . $rrr ['id'] . "' and type='1' and in_id IS NOT NULL and stock_id='" . $this->stock_id . "' and product_id='" . $p ['id'] . "' and deleted='0' ORDER BY counter ASC" );
|
||||
$GLOBALS ['db']->query ( "INSERT INTO log VALUES ('in:" . $rrr ['id'] . " s:" . $this->stock_id . " p:" . $p ['id'] . "')" );
|
||||
$rqty = 0;
|
||||
while ( $rrp = $GLOBALS ['db']->fetchByAssoc ( $ww ) ) {
|
||||
$rqty += $rrp ['quantity'];
|
||||
}
|
||||
$qty = $rrr ['qty'] - $rqty;
|
||||
if ($qty > 0) {
|
||||
$arr [] = array (
|
||||
"qty" => $qty,
|
||||
"id" => $rrr ['id'],
|
||||
"price" => $rrr ['price']
|
||||
);
|
||||
}
|
||||
}
|
||||
$rr = array ();
|
||||
$used_qty = 0;
|
||||
$stop = 0;
|
||||
foreach ( $arr as $value ) {
|
||||
if (( int ) $p ['quantity'] - $used_qty <= $value ['qty']) {
|
||||
$rr [] = array (
|
||||
"id" => $value ['id'],
|
||||
"qty" => $p ['quantity'] - $used_qty,
|
||||
"price" => $value ['price']
|
||||
);
|
||||
$stop = 1;
|
||||
} else {
|
||||
$rr [] = array (
|
||||
"id" => $value ['id'],
|
||||
"qty" => $value ['qty'],
|
||||
"price" => $value ['price']
|
||||
);
|
||||
$used_qty += $value ['qty'];
|
||||
}
|
||||
if ($stop) {
|
||||
$stop = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$qq = 0;
|
||||
$pp = 0;
|
||||
foreach ( $rr as $r ) {
|
||||
$qq += $r ['qty'];
|
||||
$pp += $r ['qty'] * $r ['price'];
|
||||
$this->addProductToStockOut ( $r ['id'], $p ['id'], $r ['qty'], $r ['price'], $this->register_date, $id, $this->stock_id, $itemid );
|
||||
}
|
||||
$GLOBALS ['db']->query ( "update ecmstockdoccorrectitems set total='-" . $pp . "',price='" . ($pp / $qq) . "' where id='" . $itemid . "'" );
|
||||
}
|
||||
function addProductToStockOut($stock_in_id, $product_id, $quantity, $price, $date, $correct_id, $stock_id, $itemid) {
|
||||
require_once ("modules/EcmStockOperations/EcmStockOperation.php");
|
||||
$o = new EcmStockOperation ();
|
||||
$o->unformat_all_fields ();
|
||||
|
||||
require_once ("modules/EcmProducts/EcmProduct.php");
|
||||
$o->product_id = $product_id;
|
||||
$p = new EcmProduct ();
|
||||
$p->retrieve ( $product_id );
|
||||
$o->product_code = $p->code;
|
||||
$o->product_name = $p->name;
|
||||
|
||||
require_once ("modules/EcmStocks/EcmStock.php");
|
||||
$o->stock_id = $stock_id;
|
||||
$s = new EcmStock ();
|
||||
$s->retrieve ( $stock_id );
|
||||
$o->stock_name = $s->name;
|
||||
|
||||
$o->parent_id = $correct_id;
|
||||
$r = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "select document_no from ecmstockdoccorrects where id='" . $correct_id . "'" ) );
|
||||
$o->parent_name = $r ['document_no'];
|
||||
$o->parent_type = "EcmStockDocCorrects";
|
||||
|
||||
$o->quantity = $quantity;
|
||||
$o->price = format_number ( $price );
|
||||
$o->in_id = $stock_in_id;
|
||||
$o->documentitem_id = $itemid;
|
||||
$o->type = 1;
|
||||
$o->save ();
|
||||
|
||||
require_once ("modules/EcmStockStates/EcmStockState.php");
|
||||
$ss = new EcmStockState ();
|
||||
$ss->UpdateStockState ( $o->stock_id, $o->product_id );
|
||||
}
|
||||
|
||||
function getPositionListOperations($array = false)
|
||||
{
|
||||
$return_array = array ();
|
||||
global $timedate,$app_list_strings;
|
||||
$z=$this->db->query("select o.in_id,o.product_id,o.product_code,o.product_name as name,o.quantity,o.price,sum(o.price*o.quantity) as total,p.unit_id, ci.ecmstockoperation_id
|
||||
from ecmstockoperations o
|
||||
inner join ecmproducts p on p.id=o.product_id
|
||||
inner join ecmstockdoccorrectitems as ci on o.documentitem_id = ci.id
|
||||
where o.parent_id='".$this->id."' group by o.id");
|
||||
$pos=0;
|
||||
while($dane=$this->db->fetchByAssoc($z)){
|
||||
$dane['position']=$pos;
|
||||
$dane['unit_name'] = $app_list_strings['ecmproducts_unit_dom'][$dane ['unit_id']];
|
||||
$dane['unit_precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$dane ['unit_id']];
|
||||
$dane['product_precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$dane ['unit_id']];
|
||||
|
||||
// Consignment
|
||||
$dane ['product_consignment_id'] = $dane ['ecmstockoperation_id'];
|
||||
// get Consignment Document no
|
||||
$documents_map = array (
|
||||
'EcmStockDocIns' => '',
|
||||
'EcmStockDocCorrects' => 'KS',
|
||||
'EcmStockDocMoves' => 'MM',
|
||||
'EcmStockDocInsideIns' => 'RW'
|
||||
);
|
||||
$db = $GLOBALS ['db'];
|
||||
$doc = $db->fetchByAssoc ( $db->query ( "SELECT parent_type, parent_id FROM ecmstockoperations WHERE id='" . $dane ['in_id'] . "'" ) );
|
||||
$doc2 = $db->fetchByAssoc ( $db->query ( "SELECT document_no FROM ".strtolower($doc ['parent_type'])." WHERE id='" . $doc ['parent_id'] . "'" ) );
|
||||
$dane ['product_consignment_doc'] = $documents_map [$doc ['parent_type']] . ' ' . $doc2 ['document_no'];
|
||||
|
||||
$return_array[]=$dane;
|
||||
$pos++;
|
||||
}
|
||||
return $return_array;
|
||||
}
|
||||
function getPosition($position) {
|
||||
if (! is_array ( $position ))
|
||||
return '';
|
||||
global $timedate, $app_list_strings;
|
||||
$return_array = array ();
|
||||
$return_array ['product_id'] = $position ['ecmproduct_id'];
|
||||
$return_array ['record_id'] = $position ['id'];
|
||||
$return_array ['position'] = $position ['position'];
|
||||
$return_array ['product_code'] = $position ['code'];
|
||||
$return_array ['name'] = $position ['name'];
|
||||
$return_array ['quantity'] = $position ['quantity'];
|
||||
$return_array ['price'] = $position ['price'];
|
||||
$return_array ['total'] = $position ['total'];
|
||||
$return_array ['old_total'] = $position ['old_total'];
|
||||
$return_array ['old_price'] = $position ['old_price'];
|
||||
$return_array['total_diff'] = $position['total_diff'];
|
||||
$return_array ['unit_id'] = $position ['dd_unit_id'];
|
||||
$return_array ['unit_name'] = $position ['dd_unit_name'];
|
||||
if ($return_array ['unit_name'] == '') {
|
||||
$lv = return_app_list_strings_language ( 'pl_pl' );
|
||||
$return_array ['unit_name'] = $lv ['ecmproducts_unit_dom'] [$return_array ['unit_id']];
|
||||
}
|
||||
$return_array ['unit_precision'] = $app_list_strings ['ecmproducts_unit_dom_precision'] [$position ['dd_unit_id']];
|
||||
$return_array ['product_precision'] = $app_list_strings ['ecmproducts_unit_dom_precision'] [$position ['dd_unit_id']];
|
||||
// Consignment
|
||||
$return_array ['product_consignment_id'] = $position ['ecmstockoperation_id'];
|
||||
// get Consignment Document no
|
||||
$documents_map = array (
|
||||
'EcmStockDocIns' => 'PZ',
|
||||
'EcmStockDocCorrects' => 'KS',
|
||||
'EcmStockDocMoves' => 'MM',
|
||||
'EcmStockDocInsideIns' => 'PW'
|
||||
);
|
||||
$db = $GLOBALS ['db'];
|
||||
$doc = $db->fetchByAssoc ( $db->query ( "SELECT parent_type, parent_name FROM ecmstockoperations WHERE id='" . $position ['ecmstockoperation_id'] . "'" ) );
|
||||
$return_array ['product_consignment_doc'] = $documents_map [$doc ['parent_type']] . ' ' . $doc ['parent_name'];
|
||||
return $return_array;
|
||||
}
|
||||
function getPositionList($array = false) {
|
||||
if (isset ( $this->id ) && $this->id != '') {
|
||||
$query = "SELECT * FROM `" . strtolower ( $this->object_name ) . "items` WHERE `" . strtolower ( $this->object_name ) . "_id`='" . $this->id . "' order by position asc";
|
||||
$r = $this->db->query ( $query );
|
||||
$return_array = array ();
|
||||
if ($r) {
|
||||
while ( $w = $this->db->fetchByAssoc ( $r ) ) {
|
||||
$return_array [] = $this->getPosition ( $w );
|
||||
}
|
||||
$json = getJSONobj ();
|
||||
return $array ? $return_array : $json->encode ( $return_array );
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function deleteAssignedPositions() {
|
||||
if (isset ( $this->id ) && $this->id != '') {
|
||||
$query = "DELETE FROM `" . strtolower ( $this->object_name ) . "items` WHERE `" . strtolower ( $this->object_name ) . "_id`='" . $this->id . "'";
|
||||
$r = $this->db->query ( $query );
|
||||
if ($r)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function formatPositions($position_list) {
|
||||
return;
|
||||
if (! is_array ( $position_list ) || count ( $position_list ) == 0)
|
||||
return false;
|
||||
global $app_list_strings;
|
||||
require_once ('modules/Currencies/Currency.php');
|
||||
foreach ( $position_list as $key => $value ) {
|
||||
$position_list [$key] ['unit_id'] = $app_list_strings ['ecmproducts_unit_dom'] [$value ['unit_id']];
|
||||
$position_list [$key] ['category_id'] = $app_list_strings ['ecmproducts_category_dom'] [$value ['category_id']];
|
||||
// $position_list[$key]['vat_id'] = format_number($value['vat_id']).'%';
|
||||
$position_list [$key] ['discount'] = format_number ( $value ['discount'] ) . '%';
|
||||
if (isset ( $currency ) && ($currency->id == $this->currency_id)) {
|
||||
} else {
|
||||
$currency = new Currency ();
|
||||
$currency->retrieve ( $this->currency_id );
|
||||
}
|
||||
$position_list [$key] ['price'] = format_number ( $value ['price'] ) . ' ' . $currency->iso4217;
|
||||
$position_list [$key] ['total'] = format_number ( $value ['total'] ) . ' ' . $currency->iso4217;
|
||||
// $position_list[$key]['price'] = format_number($value['price']).' PLN';
|
||||
// $position_list[$key]['total'] = format_number($value['total']).' PLN';
|
||||
$this->currency_symbol = $currency->iso4217;
|
||||
}
|
||||
return $position_list;
|
||||
}
|
||||
// ***************************End Managing Positions*************************//
|
||||
// begin stock
|
||||
|
||||
// end stock
|
||||
function ACLAccess($view, $is_owner = 'not_set') {
|
||||
global $current_user;
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if (file_exists ( $file )) {
|
||||
require_once ($file);
|
||||
$cc = EcmGroupSale::loadSettings ( true );
|
||||
} else
|
||||
return true;
|
||||
if (is_admin ( $current_user )) {
|
||||
switch ($view) {
|
||||
case 'confirming' :
|
||||
return ($this->status == "s20");
|
||||
case 'send_to_confirm' :
|
||||
return ($this->status == "s10");
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if ($is_owner == 'not_set') {
|
||||
$is_owner = $this->isOwner ( $current_user->id );
|
||||
}
|
||||
// if we don't implent acls return true
|
||||
if (! $this->bean_implements ( 'ACL' ))
|
||||
return true;
|
||||
$view = strtolower ( $view );
|
||||
if ($cc ['user_manager_role']) { // Manager
|
||||
switch ($view) {
|
||||
case 'list' :
|
||||
case 'index' :
|
||||
case 'listview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'list', true );
|
||||
case 'edit' :
|
||||
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 );
|
||||
case 'export' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'export', $is_owner );
|
||||
case 'import' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'import', true );
|
||||
case 'send_to_confirm' :
|
||||
return ($this->status == "s10");
|
||||
case 'can_commit' :
|
||||
return true;
|
||||
case 'confirming' :
|
||||
return ($this->status == "s20");
|
||||
case 'auto_commiting' :
|
||||
return true;
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
} else if ($cc ['user_representative_extra_role']) { // Representative Extra
|
||||
switch ($view) {
|
||||
case 'list' :
|
||||
case 'index' :
|
||||
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 true;
|
||||
case 'confirming' :
|
||||
return false;
|
||||
case 'auto_commiting' :
|
||||
return true;
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
} else if ($cc ['user_representative_role']) { // Representative
|
||||
switch ($view) {
|
||||
case 'list' :
|
||||
case 'index' :
|
||||
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;
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
}
|
||||
// if it is not one of the above views then it should be implemented on the page level
|
||||
return true;
|
||||
}
|
||||
|
||||
// mz generate number
|
||||
function generateNumber($date) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$r = $db->fetchByAssoc ( $db->query ( "SELECT count(id) as c FROM ecmstockdocinsideins WHERE deleted='0' AND YEAR(register_date)='" . date ( 'Y', strtotime ( $date ) ) . "'" ) );
|
||||
|
||||
if (! $r || ! $r ['c'] || $r ['c'] == '')
|
||||
$count = 0;
|
||||
else
|
||||
$count = intval ( $r ['c'] );
|
||||
|
||||
$count ++;
|
||||
|
||||
// has 5 digits?
|
||||
$tmp = strval ( $count );
|
||||
while ( strlen ( $tmp ) < 5 )
|
||||
$tmp = '0' . $tmp;
|
||||
|
||||
return date ( 'Ymd', strtotime ( $date ) ) . $tmp;
|
||||
}
|
||||
function generateDocNumberStock($stock, $date) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$r = $db->fetchByAssoc ( $db->query ( "SELECT count(id) as c FROM ecmstockdoccorrects WHERE deleted='0' AND YEAR(register_date)='" . date ( 'Y', strtotime ( $date ) ) . "' AND stock_id='" . $stock . "'" ) );
|
||||
$r2 = $db->fetchByAssoc ( $db->query ( "SELECT no FROM ecmstocks WHERE id='" . $stock . "'" ) );
|
||||
|
||||
if (! $r || ! $r ['c'] || $r ['c'] == '')
|
||||
$count = 0;
|
||||
else
|
||||
$count = intval ( $r ['c'] );
|
||||
|
||||
$count ++;
|
||||
|
||||
$tmp = strval ( $count );
|
||||
while ( strlen ( $tmp ) < 5 )
|
||||
$tmp = '0' . $tmp;
|
||||
|
||||
$number = date ( "Ymd", strtotime ( $date ) ) . $tmp;
|
||||
$n = intval ( substr ( $number, 8, 5 ) );
|
||||
$y = substr ( $number, 0, 4 );
|
||||
|
||||
// has 3 digits?
|
||||
while ( strlen ( $n ) < 3 )
|
||||
$n = '0' . $n;
|
||||
if ($r2 ['no'] != '')
|
||||
return '' . $n . '/' . $r2 ['no'] . '/' . $y;
|
||||
else
|
||||
return '' . $n . '/' . $y;
|
||||
}
|
||||
function formatNumber($number) {
|
||||
$n = intval ( substr ( $number, 8, 5 ) );
|
||||
$y = substr ( $number, 2, 2 );
|
||||
|
||||
// has 3 digits?
|
||||
while ( strlen ( $n ) < 3 )
|
||||
$n = '0' . $n;
|
||||
|
||||
return 'KS ' . $n . '/' . $y;
|
||||
}
|
||||
}
|
||||
?>
|
||||
65
modules/EcmStockDocCorrects/EditView.php
Executable file
65
modules/EcmStockDocCorrects/EditView.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
ini_set('display_errors',1);
|
||||
error_reporting(LC_ALL);
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'NotAValidEntryPoint' );
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
||||
require_once ('modules/EcmStockDocCorrects/EcmStockDocCorrect.php');
|
||||
require_once ('include/time.php');
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
//add jquery
|
||||
|
||||
echo '<script type="text/javascript" src="modules/EcmStockDocCorrects/javascript/searchcolumndefs.js"></script>';
|
||||
echo '<script type="text/javascript" src="include/ECM/SearchProductTable.js"></script>';
|
||||
echo '<script type="text/javascript" src="include/ECM/tablenavigator.js"></script>';
|
||||
// $cq=$current_user->getPreference('confirm_quotes');
|
||||
|
||||
$new_number = false;
|
||||
$duplicate = false;
|
||||
$focus = new EcmStockDocCorrect ();
|
||||
|
||||
if (isset ( $_REQUEST ['record'] ) && $_REQUEST['isDuplicate']=="false" ) {
|
||||
$focus->retrieve ( $_REQUEST ['record'] );
|
||||
if (isset ( $focus->id ) && $focus->id != '') {
|
||||
$focus->format_all_fields ();
|
||||
}
|
||||
}
|
||||
else if ($_REQUEST['isDuplicate']=="true") {
|
||||
$new_number=true;
|
||||
$duplicate=true;
|
||||
//get data
|
||||
$focus->retrieve($_REQUEST['return_id']);
|
||||
}
|
||||
else {
|
||||
$new_number=true;
|
||||
//dates
|
||||
$focus->stock_id=$current_user->stock_id;
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$OPT ['check_parent_id'] = false;
|
||||
}
|
||||
|
||||
//get stocks
|
||||
$res = $db->query("SELECT id, name FROM ecmstocks WHERE deleted = '0' ORDER BY name");
|
||||
$stock = '<select id="stock" name="stock"><option value=""></option>';
|
||||
$stock_body = '';
|
||||
while ($row = $db->fetchByAssoc($res))
|
||||
$stock_body.='<option value="'.$row['id'].'">'.$row['name'].'</option>';
|
||||
$stock.=$stock_body.'</select><input id="stock_id" name="stock_id" type="hidden"/>';
|
||||
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
require_once ('modules/EcmStockDocCorrects/views/EditView/view.edit.ecmstockdoccorrects.php');
|
||||
$edit = new ViewEditEcmStockDocCorrects ();
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
$edit->module = 'EcmStockDocCorrects';
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
$edit->preDisplay ();
|
||||
$edit->ss->assign ( "NEW_NUMBER", $new_number );
|
||||
$edit->ss->assign("DUPLICATE", $duplicate);
|
||||
$edit->ss->assign("STOCK", $stock);
|
||||
echo $edit->display ();
|
||||
//loading view
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmStockDocCorrects/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
106
modules/EcmStockDocCorrects/Menu.php
Executable file
106
modules/EcmStockDocCorrects/Menu.php
Executable file
@@ -0,0 +1,106 @@
|
||||
<?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.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $current_user;
|
||||
|
||||
if(ACLController::checkAccess('EcmStockDocCorrects', "edit", true)) $module_menu [] = Array("index.php?module=".'EcmStockDocCorrects'."&action=EditView&return_module=".'EcmStockDocCorrects'."&return_action=DetailView", translate('LNK_NEW_'.'ECMSTOCKDOCCORRECT', 'EcmStockDocCorrects'),"CreateEcmStockDocCorrects", 'EcmStockDocCorrects');
|
||||
|
||||
if(ACLController::checkAccess('EcmStockDocCorrects', "list", true)) $module_menu [] = Array("index.php?module=EcmStockDocCorrects&action=index&return_module=EcmStockDocCorrects&return_action=DetailView", translate('LNK_ECMSTOCKDOCCORRECTS_LIST','EcmStockDocCorrects'),"EcmStockDocCorrects", 'EcmStockDocCorrects');
|
||||
|
||||
?>
|
||||
|
||||
264
modules/EcmStockDocCorrects/PDFTemplate/content.php
Executable file
264
modules/EcmStockDocCorrects/PDFTemplate/content.php
Executable file
@@ -0,0 +1,264 @@
|
||||
<?php
|
||||
|
||||
$w = "70"; // first column width
|
||||
$w2 = "15"; // second column width
|
||||
$content = '
|
||||
<table style="width: 100%; font-size: 8pt;">
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
<b><h1>Dokument KS</h1></b>
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
Numer:
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $focus->document_no . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
</b>Data wystawienia:</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $focus->register_date . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
Wystawił:
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $user->full_name . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
Magazyn:
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $focus->stock_name . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
Typ:
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
<b>' . $app_list_strings['ecmstockdoccorrects_type_dom'][$focus->type] . '</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table><br>';
|
||||
if ($focus->name && $focus->name != '') {
|
||||
$content .= '
|
||||
<table style="width: 100%; text-align: center">
|
||||
<tr><td>
|
||||
<b>' . $focus->name . '</b>
|
||||
</td></tr>
|
||||
</table>';
|
||||
}
|
||||
|
||||
$content .= '<br>';
|
||||
|
||||
// start items table
|
||||
$columns = array ();
|
||||
if($focus->type == '6ed5b076-ddd1-9809-b236-54e5b2bcbd97'){
|
||||
//Przecena
|
||||
$columns ['position'] = array (
|
||||
'field' => array (
|
||||
'position',
|
||||
),
|
||||
'label' => 'Lp.',
|
||||
'align' => 'center',
|
||||
);
|
||||
|
||||
$columns ['name'] = array (
|
||||
'field' => array (
|
||||
'name',
|
||||
'product_code',
|
||||
),
|
||||
'label' => 'Nazwa<br>Indeks',
|
||||
'align' => 'left'
|
||||
);
|
||||
$columns ['qty'] = array (
|
||||
'field' => array (
|
||||
'quantity',
|
||||
'unit_name',
|
||||
),
|
||||
'label' => 'Ilość<br>J.m.',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['price'] = array (
|
||||
'field' => array (
|
||||
'price',
|
||||
'old_price',
|
||||
),
|
||||
'label' => 'Cena',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['total'] = array (
|
||||
'field' => array (
|
||||
'total',
|
||||
'old_total',
|
||||
'total_diff',
|
||||
),
|
||||
'label' => '<table style="width: 100%; font-size: 7pt; border: 0.5 solid black; border-collapse: collapse;margin:0px; padding:0px">
|
||||
<tr>
|
||||
<td colspan="3" style=";text-align:center"><b>Wartość</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:33%;text-align:right">Jest</td>
|
||||
<td style="width:33%;text-align:right">Było</td>
|
||||
<td style="width:33%;text-align:right">Różnica</td>
|
||||
</tr>
|
||||
</table>',
|
||||
'align' => 'right',
|
||||
);
|
||||
}else{
|
||||
$columns ['position'] = array (
|
||||
'field' => array (
|
||||
'position'
|
||||
),
|
||||
'label' => 'Lp.',
|
||||
'align' => 'center'
|
||||
);
|
||||
|
||||
$columns ['name'] = array (
|
||||
'field' => array (
|
||||
'name',
|
||||
'product_code'
|
||||
),
|
||||
'label' => 'Nazwa<br>Indeks / Partia',
|
||||
'align' => 'left'
|
||||
);
|
||||
$columns ['qty'] = array (
|
||||
'field' => array (
|
||||
'quantity',
|
||||
'unit_name'
|
||||
),
|
||||
'label' => 'Ilość<br>J.m.',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['price'] = array (
|
||||
'field' => array (
|
||||
'price',
|
||||
),
|
||||
'label' => 'Cena',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['total'] = array (
|
||||
'field' => array (
|
||||
'total',
|
||||
),
|
||||
'label' => 'Wartość',
|
||||
'align' => 'right'
|
||||
);
|
||||
}
|
||||
|
||||
// set widths
|
||||
$totals = array ();
|
||||
|
||||
$columns ['position'] ['width'] = '5';
|
||||
$columns ['name'] ['width'] = '45';
|
||||
$columns ['qty'] ['width'] = '10';
|
||||
$columns ['price'] ['width'] = '20';
|
||||
$columns ['total'] ['width'] = '20';
|
||||
|
||||
// rysujemy :)
|
||||
|
||||
if($focus->type == '7bb903d0-c296-7d1b-6e50-54c209e30850' || $focus->type == '8a6b804b-fac7-5cc2-de19-54c209116b19'){
|
||||
//Korekta plus i minus
|
||||
$content .= '
|
||||
<table style="width: 100%; font-size: 7pt; border: 0.5 solid black; border-collapse: collapse">
|
||||
<thead>
|
||||
<tr>';
|
||||
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '
|
||||
<th style="border: 0.5 solid black; width: ' . $col ['width'] . '%;">' . $col ['label'] . '</th>';
|
||||
}
|
||||
$content .= '
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
foreach ( $positions as $pos ) {
|
||||
//var_dump($pos); die();
|
||||
if ($pos['product_consignment_doc'])
|
||||
$pos['product_code'].= ' ' . $pos['product_consignment_doc'];
|
||||
$content .= '<tr>';
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '<td style="border: 0.5 solid black; text-align: ' . $col ['align'] . ';">';
|
||||
foreach ( $col ['field'] as $f ) {
|
||||
$content .= $pos [$f] . '<br>';
|
||||
}
|
||||
$content .= '</td>';
|
||||
}
|
||||
$content .= '</tr>';
|
||||
}
|
||||
|
||||
$content .= '
|
||||
</tbody>
|
||||
</table>';
|
||||
// summary table
|
||||
// get currency symbol
|
||||
$c = new Currency ();
|
||||
$c->retrieve ( $focus->currency_id );
|
||||
$symbol = $c->symbol;
|
||||
unset ( $c );
|
||||
|
||||
$content .= '<br><br>
|
||||
<table style="font-size: 9pt; border: 0.5 solid black; border-collapse: collapse; width: 215px; margin-left: 70%">
|
||||
<tr>
|
||||
<td style="border: 0.5 solid black; width: 50%;">
|
||||
Suma
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
' . format_number ( $focus->total) . ' ' . $symbol . '
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
}else if($focus->type == '6ed5b076-ddd1-9809-b236-54e5b2bcbd97'){
|
||||
//PRZECENA
|
||||
$smarty = new Sugar_Smarty ();
|
||||
$smarty->assign("positions", $positions);
|
||||
//$smarty->assign("app_list_strings", $app_list_strings);
|
||||
$content .= $smarty->fetch('modules/EcmStockDocCorrects/PDFTemplate/przecena_lista_pozycji.tpl');
|
||||
|
||||
// summary table
|
||||
// get currency symbol
|
||||
$c = new Currency ();
|
||||
$c->retrieve ( $focus->currency_id );
|
||||
$symbol = $c->symbol;
|
||||
unset ( $c );
|
||||
|
||||
$content .= '<br><br>
|
||||
<table style="font-size: 9pt; border: 0.5 solid black; border-collapse: collapse; width: 215px; margin-left: 70%">
|
||||
<tr>
|
||||
<td style="border: 0.5 solid black; width: 50%;">
|
||||
Suma
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
' . format_number ( $focus->total) . ' ' . $symbol . '
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
}
|
||||
$content .= '<br><br>' . $focus->pdf_text;
|
||||
//echo $content; die();
|
||||
5
modules/EcmStockDocCorrects/PDFTemplate/header.php
Executable file
5
modules/EcmStockDocCorrects/PDFTemplate/header.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$db = $GLOBALS ['db'];
|
||||
$querySelect = 'SELECT text0 FROM operating_values WHERE id="12"';
|
||||
$rows = $db->fetchByAssoc($db->query($querySelect));
|
||||
$header = html_entity_decode($rows['text0']);
|
||||
34
modules/EcmStockDocCorrects/PDFTemplate/helper.php
Executable file
34
modules/EcmStockDocCorrects/PDFTemplate/helper.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
function formatPDFPositions($positions, $focus) {
|
||||
$result = array();
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
|
||||
$pos['quantity'] = $pos['quantity'];
|
||||
$pos['price']=format_number($pos['price']);
|
||||
$pos['old_price']=format_number($pos['old_price']);
|
||||
$pos['total']=format_number($pos['total']);
|
||||
$pos['old_total']=format_number($pos['old_total']);
|
||||
$pos['total_diff']=format_number($pos['total_diff']);
|
||||
|
||||
$pos['quantity']=format_number($pos['quantity'],$pos['product_precision'],0);
|
||||
|
||||
|
||||
$result[] = $pos;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function mysql_escape_gpc($dirty)
|
||||
{
|
||||
if (ini_get('magic_quotes_gpc'))
|
||||
{
|
||||
return $dirty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return mysql_real_escape_string($dirty);
|
||||
}
|
||||
}
|
||||
8
modules/EcmStockDocCorrects/PDFTemplate/types.php
Executable file
8
modules/EcmStockDocCorrects/PDFTemplate/types.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
global $pdf_types;
|
||||
$pdf_types = array(
|
||||
'0' => 'KS',
|
||||
'lr' => 'Lista rozchodowo/przychodowa',
|
||||
);
|
||||
?>
|
||||
|
||||
144
modules/EcmStockDocCorrects/Save.php
Executable file
144
modules/EcmStockDocCorrects/Save.php
Executable file
@@ -0,0 +1,144 @@
|
||||
<?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 ();
|
||||
require_once ("modules/EcmStockDocCorrects/EcmStockDocCorrect.php");
|
||||
require_once ('include/formbase.php');
|
||||
$focus = new EcmStockDocCorrect ();
|
||||
|
||||
if (isset ( $_POST ['record'] ) && $_POST ['record'] != '') {
|
||||
$focus->retrieve ( $_POST ['record'] );
|
||||
}
|
||||
|
||||
if (! $focus->ACLAccess ( 'Save' )) {
|
||||
ACLController::displayNoAccess ( true );
|
||||
sugar_cleanup ( true );
|
||||
}
|
||||
$check_notify = FALSE;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
$focus->position_list = $json->decode ( htmlspecialchars_decode ( $_POST ['position_list'] ) );
|
||||
|
||||
$focus->save ( $check_notify );
|
||||
|
||||
$return_id = $focus->id;
|
||||
|
||||
echo $return_id;
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
window.open(window.open(\'index.php?module=EcmStockDocCorrects&action=createPDF&to_pdf=1&pdf_type=\'+$(\'#pdf_type\').val()+\'&record=' . $return_id . '\',\'_blank\'););
|
||||
</script>
|
||||
';
|
||||
handleRedirect ( $return_id, 'EcmStockDocCorrects' );
|
||||
?>
|
||||
76
modules/EcmStockDocCorrects/copy_old_quotes.php
Executable file
76
modules/EcmStockDocCorrects/copy_old_quotes.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
$db = $GLOBALS['db'];
|
||||
global $app_list_strings;
|
||||
|
||||
$db->query("TRUNCATE TABLE ecmstockdoccorrects");
|
||||
|
||||
$res = $db->query("SELECT * FROM ecmstockdoccorrectscp ORDER BY register_date DESC");
|
||||
|
||||
while ($r = $db->fetchByAssoc($res)) {
|
||||
$q="INSERT INTO ecmstockdoccorrects VALUES (
|
||||
'".$r['id']."',
|
||||
'".$r['name']."',
|
||||
'".$r['description']."',
|
||||
'".$r['date_entered']."',
|
||||
'".$r['date_modified']."',
|
||||
'".$r['modified_user_id']."',
|
||||
'".$r['assigned_user_id']."',
|
||||
'".$r['created_by']."',
|
||||
'".$r['deleted']."',
|
||||
'".$r['number']."',
|
||||
'".$r['document_no']."',
|
||||
'".$r['register_date']."',
|
||||
'".$r['total']."',
|
||||
'',
|
||||
'".$r['stock_to_id']."',
|
||||
'".$r['stock_from_id']."'
|
||||
);
|
||||
";
|
||||
$db->query($q);
|
||||
|
||||
$all_total = 0;
|
||||
|
||||
//get products
|
||||
//remove old
|
||||
$db->query("DELETE FROM ecmstockdoccorrectitems WHERE ecmstockdoccorrect_id='".$r['id']."'");
|
||||
|
||||
$pres = $db->query("SELECT * FROM ecmstockdomoveitemscp WHERE ecmstockdoccorrect_id='".$r['id']."'");
|
||||
|
||||
while ($p = $db->fetchByAssoc($pres)) {
|
||||
//calculate totals
|
||||
$total = $p['price']*$p['quantity'];
|
||||
$all_total+=$total;
|
||||
|
||||
$unit_name = $app_list_strings['ecmproducts_unit_dom'][$p['dd_unit_id']];
|
||||
|
||||
$pq = "INSERT INTO ecmstockdoccorrectitems VALUES(
|
||||
'".$p['id']."',
|
||||
'".$p['date_entered']."',
|
||||
'".$p['date_modified']."',
|
||||
'".$p['modified_user_id']."',
|
||||
'".$p['assigned_user_id']."',
|
||||
'".$p['created_by']."',
|
||||
'".$p['deleted']."',
|
||||
'".$p['ecmstockdoccorrect_id']."',
|
||||
'".$p['ecmproduct_id']."',
|
||||
'".$p['position']."',
|
||||
'".$p['code']."',
|
||||
'".$p['name']."',
|
||||
'".$p['quantity']."',
|
||||
'".$p['price']."',
|
||||
'$total',
|
||||
'".$p['dd_unit_id']."',
|
||||
'$unit_name',
|
||||
'".$p['ecmproductcategory_id']."'
|
||||
);";
|
||||
$db->query($pq);
|
||||
}
|
||||
|
||||
//update totals
|
||||
foreach ($vats as $k=>$v) {
|
||||
$vats_all = $k.':'.$v.',';
|
||||
}
|
||||
|
||||
$db->query("UPDATE ecmstockdoccorrects SET total='$all_total' WHERE id='".$r['id']."'");
|
||||
}
|
||||
echo 'koniec';
|
||||
249
modules/EcmStockDocCorrects/correctToKs.php
Executable file
249
modules/EcmStockDocCorrects/correctToKs.php
Executable file
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
/** Klasa do wystawiania dokumentów Ks z Faktur Korygujących
|
||||
*
|
||||
*
|
||||
*/
|
||||
echo "<pre>";
|
||||
Class correctToKs{
|
||||
|
||||
/** Zmienne Globalne;
|
||||
*
|
||||
*/
|
||||
public $db;
|
||||
public $total_value;
|
||||
public $return_list;
|
||||
public $document_list;
|
||||
public $invoice_id;
|
||||
public $wz_id;
|
||||
public $wz_id_item;
|
||||
public $ask;
|
||||
public $return;
|
||||
public $invoiceType;
|
||||
public $operation_type;
|
||||
public $correct_id;
|
||||
public $stock_id;
|
||||
public $stock_name;
|
||||
public $assigned_user_id;
|
||||
public $created_by;
|
||||
public $document_no;
|
||||
public $sell_date;
|
||||
public $ks_id;
|
||||
private $tmp_quantity;
|
||||
private $tmp_to_use_operations;
|
||||
private $tmp_total_quantity;
|
||||
private $return_operations;
|
||||
private $can_use;
|
||||
|
||||
/** Konstruktor klasy, ładuje polecenia sql do zmiennej $db, ładuje dane z korekty i faktury głownej;
|
||||
* parametry:
|
||||
* @ $correct_id : id korekty (jesli brak drugiego parametru twórzy dokumenty KS typu zwrot lub zwrot i likwidacje)
|
||||
* @ $array : czy zwrócić tablice dla dokumetu KS (opcjonalne)
|
||||
*/
|
||||
public function __construct($correct_id,$array=false) {
|
||||
$this->db=$GLOBALS['db'];
|
||||
$this->getPrimaryInvoice($correct_id);
|
||||
if($this->invoiceType!='correct')return false;
|
||||
if($this->invoice_id!='')$this->getWzId();
|
||||
$this->createReturnList();
|
||||
if($array==true) return $this->return_list;
|
||||
$this->createKsDocuments();
|
||||
}
|
||||
|
||||
public function savePlusKs(){
|
||||
|
||||
if(count($this->return_list)>0){
|
||||
|
||||
//make ks
|
||||
$ks=new EcmStockDocCorrect();
|
||||
$ks->stock_id=$this->stock_id;
|
||||
$ks->stock_name=$this->stock_name;
|
||||
$ks->register_date=date('d.m.Y');
|
||||
$ks->type='2';
|
||||
$ks->assigned_user_id=$this->assigned_user_id;
|
||||
$ks->created_by=$this->created_by;
|
||||
$ks->position_list=$this->return_list;
|
||||
$ks->pdf_text="Do Faktury korekty nr: ".$this->document_no.' z dnia '.$this->sell_date;
|
||||
$ks->total=$this->total_value;
|
||||
$this->total_value=$this->total_value*-1;
|
||||
$this->ks_id=$ks->save();
|
||||
$this->db->query("update ecminvoiceouts set purchase_price='".$this->total_value."', ks_id='".$this->ks_id."' where id='".$this->correct_id."'");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function saveMinusKs(){
|
||||
$this->total_value=0;
|
||||
$ks=new EcmStockDocCorrect();
|
||||
$ks->retrieve($this->ks_id);
|
||||
|
||||
$this->return_list=$ks->getPositionList(true);
|
||||
|
||||
foreach ($this->return_list as $key=>$val){
|
||||
|
||||
$this->ask=$this->db->query("select id,parent_name from ecmstockoperations where documentitem_id='".$this->return_list[$key]['record_id']."'");
|
||||
$this->return=$this->db->fetchByAssoc($this->ask);
|
||||
var_dump($this->return);
|
||||
$this->return_list[$key]['quantity']=floatval ( abs( $this->return_list[$key]['quantity'])*-1);
|
||||
$this->return_list[$key]['total']=floatval($this->return_list[$key]['quantity']*$this->return_list[$key]['price']);
|
||||
$this->return_list[$key]['quantity_consignment_id']=$this->return['id'];
|
||||
$this->return_list[$key]['quantity_consignment_doc']=$this->return['parent_name'];
|
||||
$this->total_value=$this->total_value+$this->return_list[$key]['total'];
|
||||
}
|
||||
unset($ks);
|
||||
|
||||
$ks=new EcmStockDocCorrect();
|
||||
$ks->stock_id=$this->stock_id;
|
||||
$ks->stock_name=$this->stock_name;
|
||||
$ks->register_date=date('d.m.Y');
|
||||
$ks->type='1';
|
||||
$ks->assigned_user_id=$this->assigned_user_id;
|
||||
$this->created_by=$this->created_by;
|
||||
$ks->position_list=$this->return_list;
|
||||
$ks->total=$this->total_value;
|
||||
$ks->save();
|
||||
}
|
||||
|
||||
public function createKsDocuments(){
|
||||
|
||||
switch ($this->operation_type) {
|
||||
case '0':
|
||||
$this->savePlusKs();
|
||||
break;
|
||||
case '1':
|
||||
$this->savePlusKs();
|
||||
$this->saveMinusKs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function getPrimaryInvoice($correct_id){
|
||||
$this->correct_id=$correct_id;
|
||||
$tmp=new EcmInvoiceOut();
|
||||
$tmp->retrieve($correct_id);
|
||||
$this->invoice_id=$tmp->ecminvoiceout_id;
|
||||
$this->invoiceType=$tmp->type;
|
||||
$this->document_no=$tmp->document_no;
|
||||
$this->sell_date=$tmp->sell_date;
|
||||
$this->operation_type=$tmp->operation_type;
|
||||
$this->stock_id=$tmp->stock_id;
|
||||
$this->stock_name=$tmp->stock_name;
|
||||
$this->assigned_user_id=$tmp->assigned_user_id;
|
||||
$this->created_by=$tmp->created_by;
|
||||
$this->document_list=$tmp->getPositionList(true);
|
||||
unset($tmp);
|
||||
}
|
||||
|
||||
public function getWzId(){
|
||||
$tmp=new EcmInvoiceOut();
|
||||
$tmp->retrieve($this->invoice_id);
|
||||
$this->wz_id=$tmp->wz_id;
|
||||
unset($tmp);
|
||||
}
|
||||
|
||||
public function getIdToFindWzOperations($record){
|
||||
$this->wz_id_item='';
|
||||
if($this->wz_id==''){
|
||||
|
||||
$this->ask=$this->db->query("select i.wz_id from ecminvoiceouts i inner join ecminvoiceoutitems ii on i.id=ii.ecminvoiceout_id where ii.id='".$record['ecminvoiceoutitem_id']."'") ;
|
||||
$this->return=$this->db->fetchByAssoc($this->ask);
|
||||
$this->wz_id_item=$this->return['wz_id'];
|
||||
} else {
|
||||
$this->wz_id_item=$this->wz_id;
|
||||
}
|
||||
$this->wz_id_item=$this->invoice_id;
|
||||
}
|
||||
|
||||
public function hasOneOperation($record){
|
||||
$quantity = $record['quantity'] -
|
||||
$record['old_quantity'];
|
||||
// nadaje cene i ilość
|
||||
$this->return_operations = $this->db->fetchByAssoc($this->ask);
|
||||
$record['price'] = $this->return_operations['price'];
|
||||
$record['quantity'] =floatval ( abs($this->tmp_quantity));
|
||||
$this->return_operations['quantity_restored'] = $this->return_operations['quantity_restored'] +
|
||||
$record['quantity'];
|
||||
// wpisywanie do operacji ile z tej parti spowrotem
|
||||
// wrócilismy na magazyn
|
||||
$this->db->query(
|
||||
'update ecmstockoperations set quantity_restored="' .
|
||||
$this->return_operations['quantity_restored'] .
|
||||
'" where id="' . $this->return_operations['id'] . '"');
|
||||
|
||||
$this->total_value= $this->total_value+($record['quantity']*$record['price']);
|
||||
$this->return_list[] = $record;
|
||||
}
|
||||
|
||||
public function hasManyOperations($record){
|
||||
// razem ilość z pozycji do dopasowania
|
||||
$this->tmp_total_quantity=abs($this->tmp_quantity);
|
||||
|
||||
$this->tmp_to_use_operations = array();
|
||||
// tablica dopasowan
|
||||
while ($this->return_operations = $this->db->fetchByAssoc($this->ask)) {
|
||||
$this->tmp_to_use_operations[] =$this->return_operations;
|
||||
}
|
||||
// rozkladanie ilosci na partie
|
||||
foreach ($this->tmp_to_use_operations as $klucz=>$war){
|
||||
if($this->tmp_total_quantity>0){
|
||||
|
||||
if($this->tmp_total_quantity-$this->tmp_to_use_operations[$klucz]['quantity']>=0){
|
||||
$this->can_use=floatval ( $this->tmp_to_use_operations[$klucz]['quantity']);
|
||||
} else {
|
||||
$this->can_use=floatval ( $this->tmp_total_quantity);
|
||||
}
|
||||
$record['quantity']=$this->can_use;
|
||||
$record['price']=$this->tmp_to_use_operations[$klucz]['price'];
|
||||
$this->tmp_to_use_operations[$klucz]['quantity_restored']=$record['quantity']+$this->tmp_to_use_operations[$klucz]['quantity_restored'];
|
||||
$this->db->query(
|
||||
'update ecmstockoperations set quantity_restored="' .
|
||||
$this->tmp_to_use_operations[$klucz]['quantity_restored'] .
|
||||
'" where id="' . $this->tmp_to_use_operations[$klucz]['id'] . '"');
|
||||
|
||||
$this->return_list[] = $record;
|
||||
$this->total_value=$this->total_value+($record['quantity']*$record['price']);
|
||||
$this->tmp_total_quantity=$this->tmp_total_quantity-$this->tmp_to_use_operations[$klucz]['quantity'];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function findWzOperations($record){
|
||||
$this->ask = $this->db->query(
|
||||
"select id,price,(quantity-IFNULL(quantity_restored,0)) as quantity,quantity_restored from ecmstockoperations where parent_id='" .
|
||||
$this->wz_id_item.
|
||||
"' and quantity!=IFNULL(quantity_restored,0) and product_id='" .
|
||||
$record['product_id'] .
|
||||
"' order by price asc");
|
||||
// wiele partii
|
||||
|
||||
if($this->ask->num_rows==0)return false;
|
||||
if ($this->ask->num_rows > 1) {
|
||||
$this->hasManyOperations($record);
|
||||
} else {
|
||||
$this->hasOneOperation($record);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function createReturnList(){
|
||||
$this->return_list=array();
|
||||
foreach ($this->document_list as $pos=>$k) {
|
||||
|
||||
$this->tmp_quantity = $this->document_list[$pos]['quantity'] - $this->document_list[$pos]['old_quantity'];
|
||||
// jak to faktura korygująca ilość na minus to kontunuuj
|
||||
if ($this->tmp_quantity < 0) {
|
||||
|
||||
$this->getIdToFindWzOperations( $this->document_list[$pos]);
|
||||
$this->findWzOperations($this->document_list[$pos]);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
34
modules/EcmStockDocCorrects/createPDF.php
Executable file
34
modules/EcmStockDocCorrects/createPDF.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
if (!$_REQUEST ['record'] || $_REQUEST ['record'] == '') {
|
||||
die('Brak rekordu');
|
||||
} else {
|
||||
$record = $_REQUEST ['record'];
|
||||
}
|
||||
include_once ("modules/EcmStockDocCorrects/PDFTemplate/helper.php");
|
||||
include_once ("modules/EcmSysInfos/EcmSysInfo.php");
|
||||
$focus = new EcmStockDocCorrect ();
|
||||
$focus->retrieve($record);
|
||||
$user = new User ();
|
||||
$user->retrieve($focus->assigned_user_id);
|
||||
include_once ("include/MPDF57/mpdf.php");
|
||||
$p = new mPDF('', 'A4', null, 'helvetica', 10, 10, 30, 45, 5, 5);
|
||||
$mpdf->mirrorMargins = 1;
|
||||
$db = $GLOBALS ['db'];
|
||||
// create and save document
|
||||
$positions = formatPDFPositions($focus->getPositionList(true), $focus);
|
||||
|
||||
$ec = new EcmSysInfo ();
|
||||
|
||||
$footer = $ec->getFooterForModule('EcmStockDocCorrects');
|
||||
$header = $ec->getHeaderForModule('EcmStockDocCorrects');
|
||||
$content = '';
|
||||
if ($_REQUEST['pdf_type']=='lr') {
|
||||
include_once ("modules/EcmStockOperations/PdfTemplate/content.php");
|
||||
$content = getDocOperations('EcmStockDocCorrects', $record);
|
||||
} else
|
||||
include_once ("modules/EcmStockDocCorrects/PDFTemplate/content.php");
|
||||
$p->SetHTMLHeader($header);
|
||||
$p->WriteHTML($content);
|
||||
$p->SetHTMLFooter($footer);
|
||||
$p->Output();
|
||||
17
modules/EcmStockDocCorrects/gran.php
Executable file
17
modules/EcmStockDocCorrects/gran.php
Executable file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
$db=$GLOBALS['db'];
|
||||
$r=$db->query("select * from ecmstockoperations where id in('fcb70d9c-e770-e141-abd6-555c89ef028a','f02b0293-56c9-d8c7-eb06-555c896fd69f','e0b10c15-bfa2-c7a1-5071-555c89c652ff','d18c03d4-d3eb-d7d7-7030-555c89333aeb','8ac670b0-5c4d-dd4f-f38a-555c8b5249b2','4a757a5b-e2be-5899-fad6-555c8dfe3c78','d2ca3d87-5719-7241-ca1f-555ed8cd473a','d4b9d6d5-59a8-6d64-256d-555ed8c39b59','6cb4be36-1f74-3f31-0a53-555ee5f6c27b','b43e071a-37f0-bc39-293f-5562d4742351','cde207f8-e997-8aa0-425e-5562d44d4d15','e1660b4e-a2f0-3718-449a-5562d4c3ff06','f0f40c89-1990-2acc-7d0c-5562d411669d','e719027d-58a2-708c-e563-5565ae618b56')");
|
||||
while($rr=$db->fetchByAssoc($r)){
|
||||
$module=substr($rr['parent_type'], 0, -1);
|
||||
$c=new EcmInvoiceOut();
|
||||
$c->retrieve($rr['parent_id']);
|
||||
$c->register_date;
|
||||
if($c->id!=''){
|
||||
$db->query("update ecmstockoperations set date_entered='".date("Y-m-d H:i:s",strtotime($c->register_date))."',parent_type='EcmInvoiceOuts' where id='".$rr['id']."'");
|
||||
} else {
|
||||
echo "'".$rr['id']."',";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
1
modules/EcmStockDocCorrects/javahelper.php
Executable file
1
modules/EcmStockDocCorrects/javahelper.php
Executable file
@@ -0,0 +1 @@
|
||||
<?php require_once('modules/EcmStockDocCorrects/javascript/helper.php');
|
||||
334
modules/EcmStockDocCorrects/javascript/helper.php
Executable file
334
modules/EcmStockDocCorrects/javascript/helper.php
Executable file
@@ -0,0 +1,334 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( '-1' );
|
||||
if (! $_POST ['job'] || $_POST ['job'] == '')
|
||||
die ( '-1' );
|
||||
switch ($_POST ['job']) {
|
||||
case 'getParentInfo' :
|
||||
getParentInfo ( $_POST ['id'], $_POST ['type'] );
|
||||
break;
|
||||
case 'generateNumber' :
|
||||
generateNumber ( $_POST ['stock'], $_POST ['date'] );
|
||||
break;
|
||||
case 'searchProducts' :
|
||||
searchProducts ( $_POST ['searchKey'], $_POST ['searchCategory'], $_POST ['searchStock'], $_POST ['searchSort'], $_POST ['searchStockId'] );
|
||||
break;
|
||||
case 'getProduct' :
|
||||
getProduct ( $_POST ['id'], $_POST ['stockId'] );
|
||||
break;
|
||||
case 'getItems' :
|
||||
getItems ( $_POST ['record'] );
|
||||
break;
|
||||
case 'getCategoriesList' :
|
||||
getCategoriesList ();
|
||||
break;
|
||||
case 'getTranslation' :
|
||||
getTranslation ( $_POST ['product_id'], $_POST ['language'], $_REQUEST ['unit_id'] );
|
||||
break;
|
||||
case 'getPricesInfo' :
|
||||
getPricesInfo ( $_POST ['product_id'], $_POST ['pricebook_id'], $_POST ['account_id'] );
|
||||
break;
|
||||
case 'getStockArray' :
|
||||
getStockArray ( $_POST ['product_id'] );
|
||||
break;
|
||||
case 'getPurchaseArray' :
|
||||
getPurchaseArray ( $_POST ['product_id'] );
|
||||
break;
|
||||
case 'getStockState' :
|
||||
getStockState ( $_POST ['id'], $_POST ['stockId'] );
|
||||
break;
|
||||
case 'getComponents' :
|
||||
getComponents ( $_POST ['product_id'] );
|
||||
break;
|
||||
case 'getConsignments' :
|
||||
getConsignments ( $_POST ['prod_id'], $_REQUEST['stock_id'] );
|
||||
break;
|
||||
case 'getConsignmentsDocs' :
|
||||
getConsignmentsDocs ( $_POST ['prod_id'], $_REQUEST ['stock_id'] );
|
||||
break;
|
||||
case 'getLastEcmStockDocCorrectsDate' : getLastEcmStockDocCorrectsDate($_POST['stock']); break;
|
||||
}
|
||||
|
||||
function getLastEcmStockDocCorrectsDate($stock){
|
||||
$db=$GLOBALS['db'];
|
||||
$uq=$db->query("SELECT MAX(register_date) AS date FROM ecmstockdoccorrects WHERE stock_id='".$stock."' and deleted=0");
|
||||
$rul=$db->fetchByAssoc($uq);
|
||||
echo json_encode($rul['date']);
|
||||
return;
|
||||
}
|
||||
|
||||
function generateNumber($mag, $date) {
|
||||
$data = array ();
|
||||
$data ['number'] = EcmStockDocCorrect::generateNumber ( $date );
|
||||
$data ['document_no'] = EcmStockDocCorrect::generateDocNumberStock ( $mag, $date );
|
||||
|
||||
echo json_encode ( $data );
|
||||
unset ( $data );
|
||||
return;
|
||||
}
|
||||
function searchProducts($searchKey, $searchCategory, $searchStock, $searchSort, $searchStockId) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = "SELECT id, code, name FROM ecmproducts WHERE
|
||||
(UPPER(code) LIKE '%$searchKey%' OR
|
||||
UPPER(name) LIKE '%$searchKey%')
|
||||
AND deleted='0' ";
|
||||
if ($searchCategory && $searchCategory != "")
|
||||
$q .= "AND product_category_id='$searchCategory' ";
|
||||
|
||||
if ($searchSort == '1')
|
||||
$q .= "ORDER BY code";
|
||||
else if ($searchSort == '2')
|
||||
$q .= "ORDER BY code DESC";
|
||||
else if ($searchSort == '3')
|
||||
$q .= "ORDER BY name";
|
||||
else if ($searchSort == '4')
|
||||
$q .= "ORDER BY name DESC";
|
||||
|
||||
$q .= " LIMIT 0,50";
|
||||
|
||||
$res = $db->query ( $q );
|
||||
$result = array ();
|
||||
|
||||
$stock_id = $searchStockId;
|
||||
|
||||
while ( $row = $db->fetchByAssoc ( $res ) ) {
|
||||
$tmp = array ();
|
||||
$tmp ['id'] = $row ['id'];
|
||||
$tmp ['name'] = $row ['name'];
|
||||
$tmp ['code'] = $row ['code'];
|
||||
|
||||
// get stock if necessary
|
||||
if ($searchStock != '1') {
|
||||
$tmp ['stock_state'] = EcmStockOperation::getStock ( $row ['id'], $stock_id );
|
||||
}
|
||||
|
||||
if ($searchStock == '3' && $tmp ['stock_state'] == 0)
|
||||
continue; // don't show null stock
|
||||
|
||||
$result [] = $tmp;
|
||||
}
|
||||
echo json_encode ( $result );
|
||||
return;
|
||||
}
|
||||
function getProduct($id, $stockId) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$p = $db->fetchByAssoc ( $db->query ( "SELECT p.id, p.code, p.name, p.unit_id,p.is_consignment, p.product_category_id,v.id as ecmvat_id, v.name as ecmvat_name, v.value as ecmvat_value FROM ecmproducts as p INNER JOIN ecmvats as v ON v.id=p.vat_id WHERE p.id='$id'" ) );
|
||||
global $app_list_strings;
|
||||
$p ['unit_name'] = $app_list_strings ['ecmproducts_unit_dom'] [$p ['unit_id']];
|
||||
$p ['stock_state'] = $tmp ['stock_state'] = EcmStockOperation::getStock ( $id, $stockId );
|
||||
$p ['unit_precision'] = $app_list_strings ['ecmproducts_unit_dom_precision'] [$p ['unit_id']];
|
||||
|
||||
echo json_encode ( $p );
|
||||
return;
|
||||
}
|
||||
function getItems($record) {
|
||||
$mm = new EcmStockDocCorrect ();
|
||||
$mm->retrieve ( $record );
|
||||
$pl = $mm->getPositionList ( true );
|
||||
unset ( $mm );
|
||||
echo json_encode ( $pl );
|
||||
return;
|
||||
}
|
||||
function getCategoriesList() {
|
||||
$db = $GLOBALS ['db'];
|
||||
$res = $db->query ( "SELECT id, name FROM ecmproductcategories WHERE deleted='0'" );
|
||||
$result = array ();
|
||||
while ( $row = $db->fetchByAssoc ( $res ) ) {
|
||||
$tmp = array ();
|
||||
$tmp ['id'] = $row ['id'];
|
||||
$tmp ['name'] = $row ['name'];
|
||||
$result [] = $tmp;
|
||||
}
|
||||
echo json_encode ( $result );
|
||||
return;
|
||||
}
|
||||
function getTranslation($product_id, $language, $unit_id) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$result = array ();
|
||||
if ($language == 'en_us') {
|
||||
$r = $db->fetchByAssoc ( $db->query ( "SELECT short_description FROM ecmproduct_language WHERE ecmproduct_id='$product_id' AND language='en'" ) );
|
||||
$result ['name'] = htmlspecialchars_decode ( $r ['short_description'] );
|
||||
} else if ($language == 'pl_pl') {
|
||||
$p = new EcmProduct ();
|
||||
$p->retrieve ( $product_id );
|
||||
$result ['name'] = htmlspecialchars_decode ( $p->name );
|
||||
unset ( $p );
|
||||
}
|
||||
$lists = return_app_list_strings_language ( $language );
|
||||
$result ['unit_name'] = $lists ['ecmproducts_unit_dom'] [$unit_id];
|
||||
unset ( $lists );
|
||||
|
||||
echo json_encode ( $result );
|
||||
return;
|
||||
}
|
||||
function getPricesInfo($product_id, $pricebook_id, $account_id) {
|
||||
$db = $GLOBALS ['db'];
|
||||
|
||||
$result = array ();
|
||||
if ($pricebook_id && $pricebook_id != '') {
|
||||
// try get price from pricebook
|
||||
$res = $db->fetchByAssoc ( $db->query ( "SELECT price FROM ecmpricebooks_ecmproducts WHERE ecmpricebook_id='$pricebook_id' AND ecmproduct_id='$product_id' AND deleted='0'" ) );
|
||||
if ($res ['price'] && $res ['price'] != '' && $res ['price'] != 0) {
|
||||
$tmp = array ();
|
||||
$tmp ['name'] = 'pricebook';
|
||||
$tmp ['price'] = $res ['price'];
|
||||
$result [] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// get from ecmprices
|
||||
$res = $db->query ( "SELECT p.name, pp.price FROM ecmprices_ecmproducts AS pp
|
||||
INNER JOIN ecmprices AS p
|
||||
ON p.id=pp.ecmprice_id
|
||||
WHERE
|
||||
pp.ecmproduct_id='$product_id'
|
||||
AND pp.price!=0" );
|
||||
while ( $row = $db->fetchByAssoc ( $res ) ) {
|
||||
$tmp = array ();
|
||||
$tmp ['name'] = $row ['name'];
|
||||
$tmp ['price'] = $row ['price'];
|
||||
$result [] = $tmp;
|
||||
}
|
||||
|
||||
// get last invoice price
|
||||
if ($account_id && $account_id != '') {
|
||||
$res = $db->fetchByAssoc ( $db->query ( "SELECT ii.subprice, i.id, i.document_no FROM ecminvoiceoutitems AS ii
|
||||
INNER JOIN ecminvoiceouts AS i
|
||||
ON ii.ecminvoiceout_id=i.id
|
||||
WHERE ii.ecmproduct_id='$product_id'
|
||||
AND i.parent_id='$account_id'
|
||||
AND ii.deleted='0'
|
||||
AND i.deleted='0'
|
||||
AND i.canceled='0'
|
||||
ORDER BY i.register_date DESC
|
||||
LIMIT 0,1" ) );
|
||||
if ($res && $res ['subprice'] != '') {
|
||||
$tmp = array ();
|
||||
$tmp ['name'] = $res ['document_no'];
|
||||
$tmp ['price'] = $res ['subprice'];
|
||||
$result [] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode ( $result );
|
||||
return;
|
||||
}
|
||||
function getStockArray($product_id) {
|
||||
$o = new EcmStockOperation ();
|
||||
echo json_encode ( $o->getStockArray ( $product_id ) );
|
||||
unset ( $o );
|
||||
return;
|
||||
}
|
||||
function getPurchaseArray($product_id) {
|
||||
$o = new EcmStockOperation ();
|
||||
echo json_encode ( $o->getPurchaseArray ( $product_id ) );
|
||||
unset ( $o );
|
||||
return;
|
||||
}
|
||||
function getStockState($id, $stock_id) {
|
||||
echo EcmStockOperation::getStock ( $id, $stock_id );
|
||||
return;
|
||||
}
|
||||
function getComponents($product_id) {
|
||||
$p = new EcmProduct ();
|
||||
$p->retrieve ( $product_id );
|
||||
echo json_encode ( $p->getPositionList ( true ) );
|
||||
return;
|
||||
}
|
||||
function getConsignments($prod_id, $stock_id) {
|
||||
$documents_map = array (
|
||||
'EcmStockDocIns' => 'PZ',
|
||||
'EcmStockDocCorrects' => 'KS',
|
||||
'EcmStockDocMoves' => 'MM',
|
||||
'EcmStockDocInsideIns' => 'PW'
|
||||
);
|
||||
|
||||
$db = $GLOBALS ['db'];
|
||||
$query = "
|
||||
select i.id, i.parent_id, i.parent_type, i.parent_name, i.price, i.quantity as in_qty, ifnull(sum(o.quantity),0) as out_qty, p.unit_id, i.part_no
|
||||
from ecmstockoperations as i
|
||||
left join ecmstockoperations as o
|
||||
on i.id = o.in_id
|
||||
inner join ecmproducts as p
|
||||
on i.product_id = p.id
|
||||
where
|
||||
i.product_id='$prod_id' and
|
||||
i.stock_id='$stock_id' and
|
||||
i.used = '0' and
|
||||
i.type='0'
|
||||
group by i.id
|
||||
order by i.date_entered;
|
||||
";
|
||||
$res = $db->query($query);
|
||||
$result = array();
|
||||
global $app_list_strings, $sugar_config;
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$availability = (floatval($row['in_qty']) - floatval($row['out_qty']));
|
||||
if ($availability<=0) continue;
|
||||
|
||||
$tmp = array();
|
||||
$tmp['operation_id'] = $row['id'];
|
||||
$tmp['document_no'] = $documents_map[$row['parent_type']].' '.$row['parent_name'];
|
||||
$tmp['availability'] = $availability;
|
||||
$tmp['parent_id'] = $row['parent_id'];
|
||||
$tmp['parent_type'] = $row['parent_type'];
|
||||
$tmp['price'] = $row['price'];
|
||||
$tmp['part_no'] = $row['part_no'];
|
||||
$tmp['unit'] = $app_list_strings['ecmproducts_unit_dom'][$row['unit_id']];
|
||||
$tmp ['precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$row ['unit_id']];
|
||||
$tmp['currency'] = $sugar_config['default_currency_iso4217'];
|
||||
|
||||
$result[] = $tmp;
|
||||
}
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
function getConsignmentsDocs($prod_id, $stock_id) {
|
||||
$documents_map = array (
|
||||
'EcmStockDocIns' => 'PZ',
|
||||
'EcmStockDocCorrects' => 'KS',
|
||||
'EcmStockDocMoves' => 'MM',
|
||||
'EcmStockDocInsideIns' => 'PW'
|
||||
);
|
||||
|
||||
$db = $GLOBALS ['db'];
|
||||
$query = "
|
||||
select i.id, i.parent_id, i.parent_type, i.parent_name, i.price, i.quantity as in_qty, ifnull(sum(o.quantity),0) as out_qty, p.unit_id
|
||||
from ecmstockoperations as i
|
||||
left join ecmstockoperations as o
|
||||
on i.id = o.in_id
|
||||
inner join ecmproducts as p
|
||||
on i.product_id = p.id
|
||||
where
|
||||
i.product_id='$prod_id' and
|
||||
i.stock_id='$stock_id' and
|
||||
i.used = '0' and
|
||||
i.type='0'
|
||||
group by i.id
|
||||
order by i.date_entered;
|
||||
";
|
||||
$res = $db->query ( $query );
|
||||
$result = array ();
|
||||
global $app_list_strings, $sugar_config;
|
||||
while ( $row = $db->fetchByAssoc ( $res ) ) {
|
||||
$availability = (floatval ( $row ['in_qty'] ) - floatval ( $row ['out_qty'] ));
|
||||
if ($availability <= 0)
|
||||
continue;
|
||||
|
||||
$tmp = array ();
|
||||
$tmp ['operation_id'] = $row ['id'];
|
||||
$tmp ['part_no'] = $documents_map [$row ['parent_type']] . ' ' . $row ['parent_name'];
|
||||
$tmp ['availability'] = $availability;
|
||||
$tmp ['parent_id'] = $row ['parent_id'];
|
||||
$tmp ['parent_type'] = $row ['parent_type'];
|
||||
$tmp ['price'] = $row ['price'];
|
||||
$tmp ['unit'] = $app_list_strings ['ecmproducts_unit_dom'] [$row ['unit_id']];
|
||||
$tmp ['precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$row ['unit_id']];
|
||||
$tmp ['currency'] = $sugar_config ['default_currency_iso4217'];
|
||||
|
||||
$result [] = $tmp;
|
||||
}
|
||||
echo json_encode ( $result );
|
||||
return;
|
||||
}
|
||||
|
||||
445
modules/EcmStockDocCorrects/language/en_us.lang.php
Executable file
445
modules/EcmStockDocCorrects/language/en_us.lang.php
Executable file
@@ -0,0 +1,445 @@
|
||||
<?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_STOCK_OUT' => 'From stock',
|
||||
'LBL_STOCK_IN' => 'To stock',
|
||||
'LBL_STOCK_OUT_NAME' => 'From stock',
|
||||
'LBL_STOCK_IN_NAME' => 'To stock',
|
||||
'LBL_ECMPRICE' => 'B2B Prices',
|
||||
'LBL_SEARCH' => 'Search',
|
||||
'LBL_CATEGORY' => 'Category',
|
||||
'LBL_PDF_TEXT' => 'PDF Text',
|
||||
'LBL_PARENT_NIP' => 'VAT ID',
|
||||
'LBL_NO_TAX' => 'No tax',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Quote',
|
||||
'LBL_SITE' => 'Site',
|
||||
'LBL_SHOW_EAN' => 'Show EAN',
|
||||
'LBL_SHOW_EAN2' => 'Show EAN2',
|
||||
// added 05.02.2009
|
||||
'LBL_QUOTE_XLS' => 'Create XLS',
|
||||
'LBL_QUOTE_XLS_BUTTON_KEY' => 'Show XLS [Alt+X]',
|
||||
'LBL_QUOTE_XLS_BUTTON_TITLE' => 'Show Quote in XLS file.',
|
||||
// added 01.09.2009
|
||||
'LBL_PRICEBOOK' => 'Price Book',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Currency',
|
||||
'LBL_DETAIL_BUTTON' => 'Details',
|
||||
// added 15.07.2009
|
||||
'LBL_EDITTABLE_UNIT' => 'Unit',
|
||||
// added 09.02.2009
|
||||
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Show images on offers',
|
||||
'LBL_SHOW_RECIPIENT_CODE' => 'Show recipient code',
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Quotes',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Quotes: Home',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmQuotes',
|
||||
|
||||
'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_ECMQUOTE_ID' => 'Quote Id',
|
||||
|
||||
'LBL_ECMQUOTE_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_RECIPIENT_CODE' => 'Recipient Code',
|
||||
'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_ECMQUOTE' => 'Create Quote',
|
||||
|
||||
'LNK_ECMQUOTES_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:',
|
||||
|
||||
'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_ECMQUOTES' => 'Quotes',
|
||||
|
||||
'LNK_ECMQUOTES_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMQUOTES_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_s70_SET_MESSAGE' => "Quote status is set to Lost :(",
|
||||
|
||||
'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',
|
||||
'LBL_CREATE_ECMINVOICEOUT_BUTTON_LABEL' => 'Create Invoice',
|
||||
|
||||
'LBL_ECMTEAM_NAME' => 'Team',
|
||||
'LBL_ECMTEAM_ID' => 'Team ID',
|
||||
|
||||
'LBL_IMAGE_SIZE' => 'Images size (%)',
|
||||
|
||||
// mz new labels
|
||||
'LBL_SEARCH' => 'Search',
|
||||
'LBL_CATEGORY' => 'Category',
|
||||
'LBL_SEARCH_STOCK' => 'Show stock states',
|
||||
'LBL_SEARCH_STOCK_OPT_NO' => 'Don\'t show stock states',
|
||||
'LBL_SEARCH_STOCK_OPT_YES' => 'Show stock states',
|
||||
'LBL_SEARCH_STOCK_OPT_NOT_NULL' => 'Only products on stock',
|
||||
'LBL_SEARCH_SORT' => 'Sort results by',
|
||||
'LBL_SEARCH_SORT_CODE' => 'Code ASC',
|
||||
'LBL_SEARCH_SORT_CODE_DESC' => 'Code DESC',
|
||||
'LBL_SEARCH_SORT_NAME' => 'Name ASC',
|
||||
'LBL_SEARCH_SORT_NAME_DESC' => 'Name DESC',
|
||||
// PDF labels
|
||||
'LBL_PDF_FOOTER_KRS' => 'KRS:',
|
||||
'LBL_PDF_FOOTER_NIP' => 'VATID:',
|
||||
'LBL_PDF_FOOTER_REGON' => 'REGON:',
|
||||
'LBL_PDF_FOOTER_BANK' => 'Bank name:',
|
||||
'LBL_PDF_FOOTER_BANK_ACCOUNT' => 'Bank account:',
|
||||
'LBL_PDF_FOOTER_GIOS' => 'GIOS number:',
|
||||
'LBL_PDF_FOOTER_SWIFT' => 'Bank SWIFT:',
|
||||
'LBL_PDF_CONTENT_QUOTE_FOR' => 'Offer for:',
|
||||
'LBL_PDF_CONTENT_REGISTER_DATE' => 'Register date:',
|
||||
'LBL_PDF_CONTENT_ISSUED_BY' => 'Issued by:',
|
||||
'LBL_PDF_CONTENT_NUMBER' => 'Number:',
|
||||
'LBL_PDF_CONTENT_LIST_POSITION' => 'No.',
|
||||
'LBL_PDF_CONTENT_LIST_IMAGE' => 'Picture',
|
||||
'LBL_PDF_CONTENT_LIST_NAME' => 'Name',
|
||||
'LBL_PDF_CONTENT_LIST_CODE' => 'Index',
|
||||
'LBL_PDF_CONTENT_LIST_QTY' => 'Quantity',
|
||||
'LBL_PDF_CONTENT_LIST_UNIT' => 'Unit',
|
||||
'LBL_PDF_CONTENT_LIST_EAN' => 'Ean',
|
||||
'LBL_PDF_CONTENT_LIST_EAN2' => 'Ean 2',
|
||||
'LBL_PDF_CONTENT_LIST_RECIPIENT_CODE' => 'Recipient Code',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_START' => 'Start price',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_NETTO' => 'Price netto',
|
||||
'LBL_PDF_CONTENT_LIST_DISCOUNT' => 'Discount',
|
||||
'LBL_PDF_CONTENT_LIST_TOTAL_NETTO' => 'Total netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_NETTO' => 'Total netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_BRUTTO' => 'Total brutto'
|
||||
)
|
||||
;
|
||||
|
||||
?>
|
||||
424
modules/EcmStockDocCorrects/language/ge_ge.lang.php
Executable file
424
modules/EcmStockDocCorrects/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,424 @@
|
||||
<?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' => 'EcmQuotes',
|
||||
|
||||
'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_ECMQUOTE_ID' => 'Quote Id',
|
||||
|
||||
'LBL_ECMQUOTE_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_ECMQUOTE' => 'Create Quote',
|
||||
|
||||
'LNK_ECMQUOTES_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_ECMQUOTES' => '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_ECMQUOTES_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMQUOTES_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',
|
||||
|
||||
'LBL_IMAGE_SIZE' => 'Images size (%)',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
406
modules/EcmStockDocCorrects/language/pl_pl.lang.php
Executable file
406
modules/EcmStockDocCorrects/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,406 @@
|
||||
<?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_STOCK_NAME' => 'Magazyn',
|
||||
'LBL_ECMPRICE' => 'Ceny B2B',
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'LBL_PDF_TEXT' => 'Uwagi',
|
||||
'LBL_PARENT_NIP' => 'NIP',
|
||||
'LBL_NO_TAX' => 'Bez Vatu',
|
||||
'LBL_SITE' => 'Strona',
|
||||
'LBL_SHOW_EAN' => 'Pokaż EAN1',
|
||||
'LBL_SHOW_EAN2' => 'Pokaż EAN2',
|
||||
// added 01.09.2009
|
||||
'LBL_ECMLANGUAGE' => 'Język',
|
||||
'LBL_PRICEBOOK' => 'Cennik',
|
||||
'LBL_EDITTABLE_RECIPIENT_CODE' => 'Kod Odbiorcy',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_DETAIL_BUTTON' => 'Szczegóły',
|
||||
// added 15.07.2009
|
||||
'LBL_EDITTABLE_UNIT' => 'J.m.',
|
||||
'LNK_ECMSTOCKDOCCORRECTS_LIST'=>'Lista Dokumentów KS',
|
||||
'LNK_NEW_ECMSTOCKDOCCORRECT'=>'Utwórz Dokument KS',
|
||||
// added 09.02.2009
|
||||
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Pokaż obrazki w PDFie',
|
||||
'LBL_SHOW_RECIPIENT_CODE' => 'Pokaż kod odbiorcy',
|
||||
'LBL_ECMPRODUCTSTOCKINDEX'=>'Kartoteka Materiałowa',
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Dokumenty KS',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Dokumenty KS: Strona Główna',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmStockDocCorrects',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista KS',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowa KS',
|
||||
|
||||
'LBL_DETAILS' => 'Szczegóły KS',
|
||||
|
||||
'LBL_ITEMS' => 'KS:',
|
||||
|
||||
'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_ECMQUOTE_ID' => 'Id Oferty',
|
||||
|
||||
'LBL_ECMQUOTE_NAME' => 'Nazwa Oferty',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Data Dokumentu',
|
||||
|
||||
'LBL_SELL_DATE' => 'Data Sprzedazy',
|
||||
|
||||
'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_ECMQUOTE' => 'Utwórz Ofertę',
|
||||
|
||||
'LNK_ECMQUOTES_LIST' => 'Lista Ofert',
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_IMG_NEW' => 'Nowy, dodaj do bazy',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edycja',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Chcesz potwierdzic tą Ofertę?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Pokaz PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Pokaz PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Pokaz Ofertę 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 Sprzedazy',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Stwórz Zamówienie Sprzedazy [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Stwórz Zamówienie Sprzedazy.',
|
||||
|
||||
'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 Sprzedazy.',
|
||||
|
||||
// buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Zapisz i Wyslij [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Zapisz i Wyslij',
|
||||
'LBL_TYPE'=>'Typ',
|
||||
'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 Ofert [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' => 'Oferta nie została zapisana. Sprawdz czy wszytskie pola sa poprawne!',
|
||||
|
||||
'LBL_SAVED' => 'Oferta została zapisana 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' => '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' => 'Notatki',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emaile',
|
||||
|
||||
'LBL_DASHLET_MY_ECMQUOTES' => 'Oferty',
|
||||
|
||||
'LNK_ECMQUOTES_PDFLANGUAGES' => 'Ustawienia PDF',
|
||||
'LBL_ECMQUOTES_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 Oferty ustawiony.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Oferta czeka na potwierdzenie.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Oferta jest potwierdzony.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Status Oferty 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 Oferty',
|
||||
'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',
|
||||
|
||||
'LBL_IMAGE_SIZE' => 'Rozmiar obrazków (%)',
|
||||
|
||||
// mz new fields
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'LBL_SEARCH_STOCK' => 'Stan magazynowy',
|
||||
'LBL_SEARCH_STOCK_OPT_NO' => 'Nie pokazuj',
|
||||
'LBL_SEARCH_STOCK_OPT_YES' => 'Pokaż',
|
||||
'LBL_SEARCH_STOCK_OPT_NOT_NULL' => 'Tylko produkty dostępne',
|
||||
'LBL_SEARCH_SORT' => 'Sortuj wyniki wg.',
|
||||
'LBL_SEARCH_SORT_CODE' => 'Kod rosnąco',
|
||||
'LBL_SEARCH_SORT_CODE_DESC' => 'Kod malejąco',
|
||||
'LBL_SEARCH_SORT_NAME' => 'Nazwa rosnąco',
|
||||
'LBL_SEARCH_SORT_NAME_DESC' => 'Nazwa malejąco'
|
||||
);
|
||||
|
||||
?>
|
||||
125
modules/EcmStockDocCorrects/metadata/SearchFields.php
Executable file
125
modules/EcmStockDocCorrects/metadata/SearchFields.php
Executable file
@@ -0,0 +1,125 @@
|
||||
<?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['EcmStockDocCorrects'] = array (
|
||||
|
||||
'name' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'description' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'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' ),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
192
modules/EcmStockDocCorrects/metadata/detailviewdefs.php
Executable file
192
modules/EcmStockDocCorrects/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,192 @@
|
||||
<?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 ['EcmStockDocCorrects'] ['DetailView'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'form' => array (
|
||||
|
||||
'buttons' => array (
|
||||
'CANCEL_DOC',
|
||||
array (
|
||||
'customCode' => "{include_php file='include/ECM/EcmCreatePdfButton.php'}",
|
||||
),
|
||||
),
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="vats_summary" id="vats_summary" value=\'{$fields.vats_summary.value}\'>',
|
||||
'<input type="hidden" id="doc_total" value=\'{$fields.total.value}\'>',
|
||||
'<input type="hidden" id="operations_out" value=\'{$OP_OUT}\'>',
|
||||
'<input type="hidden" id="operations_in" value=\'{$OP_IN}\'>'
|
||||
)
|
||||
),
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/EcmStockDocCorrectsDetail.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/helper.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/bimit_table.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/columndefs-detail.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'panels' => array (
|
||||
|
||||
'LBL_DETAILS_TAB' => array (
|
||||
|
||||
array (
|
||||
'document_no',
|
||||
'assigned_user_name'
|
||||
),
|
||||
|
||||
array (
|
||||
'name',
|
||||
'stock_name'
|
||||
),
|
||||
|
||||
array (
|
||||
'register_date',
|
||||
'type'
|
||||
),
|
||||
array (
|
||||
'ecmproductstockindex_name',
|
||||
),
|
||||
array (
|
||||
'pdf_text'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<br>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$MODIFIED_BY_NAME}'
|
||||
),
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$CREATED_BY_NAME}'
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
'LBL_ITEMS_TAB' => array (
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<div id="itemsTable"></div>'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
195
modules/EcmStockDocCorrects/metadata/editviewdefs.php
Executable file
195
modules/EcmStockDocCorrects/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,195 @@
|
||||
<?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 ['EcmStockDocCorrects'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'enctype' => 'multipart/form-data',
|
||||
'buttons' => array (
|
||||
array(
|
||||
'customCode'=>'<input class="button primary" type="submit" value="Zapisz" name="button" onclick="this.form.action.value=\'Save\'; return check_form(\'EditView\',event);" accesskey="S" title="Zapisz [Alt+S]">',
|
||||
|
||||
),
|
||||
'CANCEL'
|
||||
),
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="new_number" id="new_number" value=\'{$NEW_NUMBER}\'>',
|
||||
'<input type="hidden" name="vats_summary" id="vats_summary" value=\'\'>',
|
||||
'<input type="hidden" id="total_netto" name="total_netto" value=\'{$fields.total_netto.value}\'>',
|
||||
'<input type="hidden" id="total_brutto" name="total_brutto" value=\'{$fields.total_brutto.value}\'>',
|
||||
'<input type="hidden" id="status" name="status" value=\'\'>',
|
||||
'<input type="hidden" id="duplicate" name="duplicate" value=\'{$DUPLICATE}\'>',
|
||||
'<input type="hidden" id="position_list" name="position_list" value="">'
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/EcmStockDocCorrects.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/bimit_table.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/columndefs.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocCorrects/javascript/Consignments.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/ECM/EcmDocumentNumberGenerator/EcmDocumentNumberGenerator.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_DETAILS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'type' => 'tab',
|
||||
'active' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<div id="tst" style="display:none;"></div><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}\'><p id="tmp_number"></p>'
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input type="text" name="name" id="name" value="{$fields.name.value}" style="width:450px" size="30" />'
|
||||
),
|
||||
array (
|
||||
'name' => 'stock_id',
|
||||
'label' => 'LBL_STOCK_NAME',
|
||||
'customCode' => '{$STOCK}'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'register_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array (
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'type',
|
||||
'tabIndex' => '1',
|
||||
'displayParams' => array (
|
||||
'noedit' => 'a'
|
||||
)
|
||||
),
|
||||
|
||||
)
|
||||
,
|
||||
array (
|
||||
'name'=>'ecmproductstockindex_name',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_PDF_TEXT}</h4>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'name' => 'pdf_text'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_ITEMS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'type' => 'tab'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<div id="searchProducts" class="edit view search basic">
|
||||
<br>
|
||||
<input type="hidden" id="searchStart" name="searchStart" value="0">
|
||||
<input type="hidden" id="searchCount" name="searchCount" value="">
|
||||
<input type="hidden" id="searchSort" name="searchSort" value="1">
|
||||
{$MOD.LBL_SEARCH}:
|
||||
<input type="text" value="" id="searchProductsInput"/>
|
||||
<img onclick="$(\'#searchProductsInput\').val(\'%\');searchProducts();" src="modules/EcmSales/images/search.gif" style="cursor: pointer;">
|
||||
{$MOD.LBL_CATEGORY}:
|
||||
<select id="productSearchCategory"></select>
|
||||
{$MOD.LBL_SEARCH_STOCK}:
|
||||
<select id="productSearchStock" onchange="searchProducts();">
|
||||
<option value="1">Produkty</option>
|
||||
<option value="4" selected="selected">Magazyn </option>
|
||||
<option value="3">Dostępne</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="searchResultDiv"/></div>
|
||||
<br><br><div id="itemsTable"></div>'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
123
modules/EcmStockDocCorrects/metadata/listviewdefs.php
Executable file
123
modules/EcmStockDocCorrects/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,123 @@
|
||||
<?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 ["EcmStockDocCorrects"] = array (
|
||||
|
||||
'NUMBER' => array (
|
||||
'width' => '5',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
|
||||
|
||||
'NAME' => array (
|
||||
'width' => '15',
|
||||
'label' => 'LBL_NAME',
|
||||
'default' => true,
|
||||
'sortable' => true
|
||||
),
|
||||
|
||||
'TOTAL' => array (
|
||||
'width' => '5',
|
||||
'label' => 'LBL_TOTAL',
|
||||
'default' => true,
|
||||
'sumType' => 'sum',
|
||||
),
|
||||
'TYPE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_TYPE',
|
||||
'default' => true,
|
||||
'sortable' => true),
|
||||
'STOCK_NAME' => array (
|
||||
'width' => '5',
|
||||
'label' => 'LBL_STOCK_NAME',
|
||||
'default' => false
|
||||
),
|
||||
|
||||
'MODIFIED_BY_NAME' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MODIFIED_USER',
|
||||
'module' => 'Users',
|
||||
'id' => 'USERS_ID',
|
||||
'default' => false,
|
||||
'sortable' => false,
|
||||
'related_fields' => array (
|
||||
'modified_user_id'
|
||||
)
|
||||
),
|
||||
|
||||
'DOCUMENT_AUTOINCREMENT' => array(
|
||||
'width' => '15',
|
||||
'label' => 'Data dokumentu',
|
||||
'default' => true,
|
||||
|
||||
),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
),
|
||||
'OPTIONS' => array (
|
||||
'width' => '2',
|
||||
'label' => 'PDF',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'center'
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
?>
|
||||
119
modules/EcmStockDocCorrects/metadata/searchdefs.php
Executable file
119
modules/EcmStockDocCorrects/metadata/searchdefs.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?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['EcmStockDocCorrects'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
'label' => '10',
|
||||
|
||||
'field' => '30'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'layout' => array (
|
||||
|
||||
'basic_search' => array (
|
||||
'document_no',
|
||||
'stock_id',
|
||||
'ecmproductstockindex_name',
|
||||
'register_date',
|
||||
'assigned_user_name',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
|
||||
),
|
||||
|
||||
'advanced_search' => array (
|
||||
'document_no',
|
||||
'name',
|
||||
'register_date',
|
||||
'stock_id',
|
||||
'ecmproductstockindex_name',
|
||||
'type',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
76
modules/EcmStockDocCorrects/metadata/studio.php
Executable file
76
modules/EcmStockDocCorrects/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']['EcmQuotes'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmQuotes/DetailView.html',
|
||||
'php_file' => 'modules/EcmQuotes/DetailView.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmQuotes/EditView.html',
|
||||
'php_file' => 'modules/EcmQuotes/EditView.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template' => 'listview',
|
||||
'meta_file' => 'modules/EcmQuotes/listviewdefs.php',
|
||||
'type' => 'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmQuotes/SearchForm.html',
|
||||
'php_file' => 'modules/EcmQuotes/ListView.php',
|
||||
'type' => 'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
109
modules/EcmStockDocCorrects/metadata/subpaneldefs.php
Executable file
109
modules/EcmStockDocCorrects/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,109 @@
|
||||
<?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['EcmStockDocCorrects']['subpanel_setup'] = array (
|
||||
|
||||
|
||||
/*
|
||||
'emails' => array (
|
||||
|
||||
'order' => 15,
|
||||
|
||||
'module' => 'Emails',
|
||||
|
||||
'sort_order' => 'asc',
|
||||
|
||||
'sort_by' => 'date_modified',
|
||||
|
||||
'get_subpanel_data' => 'emails',
|
||||
|
||||
'add_subpanel_data' => 'emails_id',
|
||||
|
||||
'subpanel_name' => 'ForEcmQuotes',
|
||||
|
||||
'title_key' => 'LBL_EMAILS_SUBPANEL_TITLE',
|
||||
|
||||
'top_buttons' => array(),
|
||||
|
||||
),
|
||||
*/
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
125
modules/EcmStockDocCorrects/metadata/subpanels/ForProduct.php
Executable file
125
modules/EcmStockDocCorrects/metadata/subpanels/ForProduct.php
Executable file
@@ -0,0 +1,125 @@
|
||||
<?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".
|
||||
*/
|
||||
|
||||
$subpanel_layout = array(
|
||||
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array (
|
||||
|
||||
/*
|
||||
'number' => array (
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'module' => 'EcmSales',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
*/
|
||||
'document_no' => array (
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'module' => 'EcmSales',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '5%',
|
||||
),
|
||||
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'module' => 'EcmSales',
|
||||
'width' => '5%',
|
||||
),
|
||||
|
||||
'QUANTITY' => array (
|
||||
'name' => 'quantity',
|
||||
'vname' => 'Ilość',
|
||||
'align'=>'right',
|
||||
'module' => 'EcmSales',
|
||||
'width' => '5%',
|
||||
),
|
||||
'PRICE_NETTO' => array (
|
||||
'name' => 'price_netto',
|
||||
'vname' => 'Cena netto',
|
||||
'align'=>'right',
|
||||
'module' => 'EcmSales',
|
||||
'width' => '5%',
|
||||
),
|
||||
'TOTAL_NETTO' => array (
|
||||
'name' => 'total_netto',
|
||||
'vname' => 'Wartość netto',
|
||||
'align'=>'right',
|
||||
'module' => 'EcmSales',
|
||||
'width' => '5%',
|
||||
),
|
||||
|
||||
'options' => array (
|
||||
'name' => 'options',
|
||||
'label' => ' ',
|
||||
'default' => true,
|
||||
'width' => '5%',
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'TYPE' => array (
|
||||
'name' => 'status',
|
||||
'vname' => ' ',
|
||||
'module' => 'EcmSales',
|
||||
'width' => '70%',
|
||||
),
|
||||
/*
|
||||
'PDF_URL' => array(
|
||||
'width' => '2%',
|
||||
'label' => ' ',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
124
modules/EcmStockDocCorrects/metadata/subpanels/default.php
Executable file
124
modules/EcmStockDocCorrects/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?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".
|
||||
*/
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmQuotes'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array (
|
||||
|
||||
'status' => array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'module' => 'EcmQuotes',
|
||||
'width' => '5%',
|
||||
),
|
||||
/*
|
||||
'number' => array (
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'module' => 'EcmQuotes',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
*/
|
||||
'document_no' => array (
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'module' => 'EcmQuotes',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '15%',
|
||||
),
|
||||
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'module' => 'EcmQuotes',
|
||||
'width' => '40%'
|
||||
),
|
||||
|
||||
'total' => array (
|
||||
'name' => 'total',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'module' => 'EcmQuotes',
|
||||
'width' => '15%',
|
||||
),
|
||||
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'module' => 'EcmQuotes',
|
||||
'width' => '10%',
|
||||
),
|
||||
'price' => array (
|
||||
'name' => 'price',
|
||||
'vname' => 'Cena',
|
||||
'module' => 'EcmStockDocIns',
|
||||
'width' => '5%',
|
||||
),
|
||||
'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%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
422
modules/EcmStockDocCorrects/vardefs.php
Executable file
422
modules/EcmStockDocCorrects/vardefs.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.
|
||||
* ******************************************************************************
|
||||
*/
|
||||
$dictionary ['EcmStockDocCorrect'] = array (
|
||||
'table' => "ecmstockdoccorrects",
|
||||
'comment' => 'EcmStockDocCorrects',
|
||||
'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'
|
||||
),
|
||||
'document_autoincrement' => array (
|
||||
'name' => 'document_autoincrement',
|
||||
'vname' => 'Data dokumentu',
|
||||
'type' => 'varchar',
|
||||
'reportable' => true,
|
||||
// 'source' => 'non-db',
|
||||
'required' => false
|
||||
),
|
||||
'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'
|
||||
),
|
||||
'canceled' => array (
|
||||
'name' => 'canceled',
|
||||
'vname' => 'LBL_ORDER_NO',
|
||||
'type' => 'varchar',
|
||||
'len' => 255
|
||||
),
|
||||
'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'
|
||||
),
|
||||
'ecmproduct_id' =>
|
||||
array (
|
||||
'name' => 'ecmproduct_id',
|
||||
'vname' => 'produkt',
|
||||
'type' => 'varchar',
|
||||
'len' => '244',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'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
|
||||
),
|
||||
'ecmproductstockindex_name' => array (
|
||||
'name' => 'ecmproductstockindex_name',
|
||||
'parent_type' => 'ecmquotes_parent_dom',
|
||||
// 'type_name'=>'parent_type',
|
||||
'id_name' => 'ecmproductstockindex_id',
|
||||
'vname' => 'LBL_ECMPRODUCTSTOCKINDEX',
|
||||
'type' => 'relate',
|
||||
'group' => 'parent_name',
|
||||
'dbtype' => 'varchar',
|
||||
'len' => '255',
|
||||
// 'source'=>'non-db',
|
||||
'module' => 'EcmProductStockIndexs',
|
||||
'massupdate' => false,
|
||||
// 'options'=> 'ecmquotes_parent_dom',
|
||||
'required' => false
|
||||
),
|
||||
'ecmproductstockindex_id' => array (
|
||||
'name' => 'ecmproductstockindex_id',
|
||||
'type' => 'id',
|
||||
'module' => 'EcmProductStockIndexs',
|
||||
'vname' => 'LBL_ECMPRODUCTSTOCKINDEX',
|
||||
'group' => 'ecmproductstockindex_name',
|
||||
'massupdate' => false,
|
||||
'reportable' => false,
|
||||
'required' => 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' => 'ecmstockdoccorrects' . '_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' => 'ecmstockdoccorrects' . '_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' => 'ecmstockdoccorrects' . '_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' => false,
|
||||
'len' => '20'
|
||||
),
|
||||
'type' => array (
|
||||
'name' => 'type',
|
||||
'vname' => 'LBL_TYPE',
|
||||
'Importable' => false,
|
||||
'reportable' => false,
|
||||
'required' => true,
|
||||
'noeditable' => true,
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmstockdoccorrects_type_dom',
|
||||
'massupdate' => false
|
||||
),
|
||||
'document_no' => array (
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '30'
|
||||
),
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => true
|
||||
),
|
||||
'total' => array (
|
||||
'name' => 'total_netto',
|
||||
'vname' => 'LBL_SUBTOTAL',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2'
|
||||
),
|
||||
'pdf_text' => array (
|
||||
'name' => 'pdf_text',
|
||||
'vname' => 'LBL_PDF_TEXT',
|
||||
'type' => 'text'
|
||||
),
|
||||
'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'
|
||||
),
|
||||
'stock_name' =>
|
||||
array (
|
||||
'name' => 'stock_name',
|
||||
'vname' => 'LBL_STOCK_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'ecmstocks',
|
||||
'id_name' => 'stock_id',
|
||||
'module' => 'EcmStocks',
|
||||
'group'=>'stock_name',
|
||||
'massupdate' => false,
|
||||
'required' => false,
|
||||
),
|
||||
'stock_id' =>
|
||||
array (
|
||||
'name' => 'stock_id',
|
||||
'type' => 'enum',
|
||||
'module' => 'EcmStocks',
|
||||
'table'=>'ecmstocks',
|
||||
'vname' => 'LBL_STOCK_NAME',
|
||||
'group'=>'stock_name',
|
||||
'options'=>'ecmstocks_list_dom',
|
||||
'required' => true,
|
||||
'massupdate'=>false,
|
||||
),
|
||||
// FOR SUBPANELS
|
||||
'ecminvoiceouts' => array(
|
||||
'name' => 'ecmstockdocins',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmstockdoccorrects_ecminvoiceouts',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'Faktury'
|
||||
),
|
||||
'notes' => array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmstockdoccorrects_notes',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES'
|
||||
)
|
||||
),
|
||||
// INDICES SECTION
|
||||
'indices' => array (
|
||||
array (
|
||||
'name' => 'ecmstockdoccorrects' . 'pk',
|
||||
'type' => 'primary',
|
||||
'fields' => array (
|
||||
'id'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'idx_' . 'ecmstockdoccorrects' . '_document_no',
|
||||
'type' => 'index',
|
||||
'fields' => array (
|
||||
'document_no'
|
||||
)
|
||||
)
|
||||
),
|
||||
// RELATIONSHIPS SECTION
|
||||
'relationships' => array (
|
||||
'ecmstockdoccorrects' . '_assigned_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmStockDocCorrects',
|
||||
'rhs_table' => 'ecmstockdoccorrects',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdoccorrects' . '_modified_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmStockDocCorrects',
|
||||
'rhs_table' => 'ecmstockdoccorrects',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdoccorrects' . '_created_by' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmStockDocCorrects',
|
||||
'rhs_table' => 'ecmstockdoccorrects',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdoccorrects_ecminvoiceouts' => array(
|
||||
'lhs_module' => 'EcmStockDocCorrects',
|
||||
'lhs_table' => 'ecmstockdoccorrects',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmInvoiceOuts',
|
||||
'rhs_table' => 'ecminvoiceouts',
|
||||
'rhs_key' => 'ks_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdoccorrects_notes' => array (
|
||||
'lhs_module' => 'EcmStockDocCorrects',
|
||||
'lhs_table' => 'ecmstockdoccorrects',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Notes',
|
||||
'rhs_table' => 'notes',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many',
|
||||
'relationship_role_column' => 'parent_type',
|
||||
'relationship_role_column_value' => 'EcmStockDocCorrects'
|
||||
)
|
||||
),
|
||||
// THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
|
||||
'optimistic_locking' => true
|
||||
);
|
||||
95
modules/EcmStockDocCorrects/views/DetailView/view.detail.my.php
Executable file
95
modules/EcmStockDocCorrects/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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
184
modules/EcmStockDocCorrects/views/EditView/view.edit.ecmstockdoccorrects.php
Executable file
184
modules/EcmStockDocCorrects/views/EditView/view.edit.ecmstockdoccorrects.php
Executable file
@@ -0,0 +1,184 @@
|
||||
<?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 ViewEditEcmStockDocCorrects 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 ViewEditEcmStockDocCorrects(){
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
252
modules/EcmStockDocCorrects/views/view.list.php
Executable file
252
modules/EcmStockDocCorrects/views/view.list.php
Executable file
@@ -0,0 +1,252 @@
|
||||
<?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 EcmStockDocCorrectsViewList extends ViewList{
|
||||
|
||||
function EcmStockDocCorrectsViewList(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->module=$module = "EcmStockDocCorrects";
|
||||
$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);
|
||||
|
||||
if(!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select']!='_none') {
|
||||
if(empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query']!='true')) {
|
||||
$this->saved_search = loadBean('SavedSearch');
|
||||
$this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']);
|
||||
$this->saved_search->populateRequest();
|
||||
}
|
||||
elseif(!empty($_REQUEST['button'])) { // click the search button, after retrieving from saved_search
|
||||
$_SESSION['LastSavedView'][$_REQUEST['module']] = '';
|
||||
unset($_REQUEST['saved_search_select']);
|
||||
unset($_REQUEST['saved_search_select_name']);
|
||||
}
|
||||
}
|
||||
|
||||
$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