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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
428
modules/EcmInventorys/EcmInventory.php
Executable file
428
modules/EcmInventorys/EcmInventory.php
Executable file
@@ -0,0 +1,428 @@
|
||||
<?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 EcmInventory 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 $ecmstockdoccorrects_name_minus;
|
||||
var $ecmstockdoccorrects_name_plus;
|
||||
var $stock_id;
|
||||
// SUBPANELS RELATED
|
||||
// MODULE OBJECT DETAILS
|
||||
var $module_dir = "EcmInventorys";
|
||||
var $table_name = "ecminventorys";
|
||||
var $object_name = "EcmInventory";
|
||||
// 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 EcmInventory() {
|
||||
parent::SugarBean ();
|
||||
$this->setupCustomFields ( 'EcmInventorys' );
|
||||
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 get_list_view_data() {
|
||||
$row_view = parent::get_list_view_data ();
|
||||
if( strlen($row_view['ECMSTOCKDOCCORRECTS_ID_MINUS']) > 0){
|
||||
$korekta_minus = new EcmStockDocCorrect();
|
||||
$korekta_minus->retrieve($row_view['ECMSTOCKDOCCORRECTS_ID_MINUS']);
|
||||
$korekta_minus_link = '<a href="index.php?module=EcmStockDocCorrects&action=DetailView&record=' . $korekta_minus->id . '">' . $korekta_minus->document_no .'</a>';
|
||||
unset($korekta_minus);
|
||||
$row_view['ECMSTOCKDOCCORRECTS_ID_MINUS'] = $korekta_minus_link;
|
||||
}
|
||||
if( strlen($row_view['ECMSTOCKDOCCORRECTS_ID_PLUS']) > 0){
|
||||
$korekta_plus = new EcmStockDocCorrect();
|
||||
$korekta_plus->retrieve($row_view['ECMSTOCKDOCCORRECTS_ID_PLUS']);
|
||||
$korekta_plus_link = '<a href="index.php?module=EcmStockDocCorrects&action=DetailView&record=' . $korekta_plus->id . '">' . $korekta_plus->document_no .'</a>';
|
||||
unset($korekta_plus);
|
||||
$row_view['ECMSTOCKDOCCORRECTS_ID_PLUS'] = $korekta_plus_link;
|
||||
}
|
||||
return $row_view;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL' :
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function retrieve($id = -1, $encode=true,$deleted=true){
|
||||
$EcmInventory = parent::retrieve ($id ,$encode,$deleted);
|
||||
$EcmInventory->position_list = $EcmInventory->getPositionList();
|
||||
if( strlen($EcmInventory->ecmstockdoccorrects_id_minus) > 0){
|
||||
$korekta_minus = new EcmStockDocCorrect();
|
||||
$korekta_minus->retrieve($EcmInventory->ecmstockdoccorrects_id_minus);
|
||||
$EcmInventory->ecmstockdoccorrects_name_minus = $korekta_minus->document_no;
|
||||
unset($korekta_minus);
|
||||
}
|
||||
if( strlen($EcmInventory->ecmstockdoccorrects_id_plus) > 0){
|
||||
$korekta_plus = new EcmStockDocCorrect();
|
||||
$korekta_plus->retrieve($EcmInventory->ecmstockdoccorrects_id_plus);
|
||||
$EcmInventory->ecmstockdoccorrects_name_plus = $korekta_plus->document_no;
|
||||
unset($korekta_plus);
|
||||
}
|
||||
//var_dump($EcmInventory);
|
||||
return $EcmInventory;
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE) {
|
||||
global $current_user,$app_list_strings;
|
||||
if($this->number == ''){
|
||||
$this->number = $this->generateNumber();
|
||||
}
|
||||
|
||||
$return_id = parent::save ( $check_notify );
|
||||
$this->deleteAssignedPositions();
|
||||
//zapis pozycji
|
||||
foreach ($this->position_list as $value) {
|
||||
if ($value ['ecmproduct_id'] == '') {
|
||||
continue;
|
||||
}
|
||||
$item_id = create_guid();
|
||||
$arr = array (
|
||||
'id' => $item_id,
|
||||
'date_entered' => 'NOW()',
|
||||
'date_modified' => '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' => $return_id,
|
||||
'ecmproduct_id' => $value['ecmproduct_id'],
|
||||
'position' => $value,
|
||||
'code' => $value['code'],
|
||||
'name' => $value['name'],
|
||||
'price'=> $value['price'],
|
||||
'total'=> ROUND($value['price'] * $value['quantity'],2),
|
||||
'quantity' => $value['quantity'],
|
||||
'dd_unit_id' => $value['dd_unit_id'],
|
||||
'dd_unit_name' => $app_list_strings['ecmproducts_unit_dom'][$value['dd_unit_id']],
|
||||
'ecmproductcategory_id' => $value['ecmproductcategory_id'],
|
||||
);
|
||||
$keys = array_keys($arr);
|
||||
$values = array_values($arr);
|
||||
$inster_query = 'INSERT INTO ecminventoryitems (' . implode(",",$keys) .') VALUES ("' . implode('","',$values) . '");';
|
||||
$inster_query = str_replace ( '"NOW()"', 'NOW()', $inster_query );
|
||||
$this->db->query ($inster_query);
|
||||
}
|
||||
return $return_id;
|
||||
}
|
||||
|
||||
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 generateNumber() {
|
||||
$date = $this->register_date;
|
||||
$db = $GLOBALS['db'];
|
||||
$r = $db->fetchByAssoc($db->query("SELECT count(id) as c FROM ecminventorys 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 getPositionList(){
|
||||
global $app_list_strings;
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT * FROM ecminventoryitems WHERE ecminventory_id ="' . $this->id . '";';
|
||||
$rs = $db->query($q);
|
||||
$id_array = array();
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$row['stock_state'] = EcmStockOperation::getStock($row['ecmproduct_id'] , $this->stock_id);
|
||||
$row['stock_state_quantity_difference'] = $row['quantity']-$row['stock_state'];
|
||||
$row['dd_unit_precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$row ['dd_unit_id']];
|
||||
|
||||
if($row['stock_state_quantity_difference'] < 0){
|
||||
//specjalna tabelka dla pobrania przewidywanej ceny
|
||||
$tmp = array(
|
||||
'ecmproduct_id' => $row['ecmproduct_id'],
|
||||
'quantity' => abs($row['stock_state_quantity_difference']),
|
||||
);
|
||||
$tabelka_z_cenami = $this->getPriceInfo($tmp);
|
||||
//$ilosc = 0;
|
||||
$wartosc = 0;
|
||||
foreach($tabelka_z_cenami as $cenka){
|
||||
//$ilosc += $cenka['qty'];
|
||||
$wartosc += $cenka['qty'] * $cenka['price'];
|
||||
}
|
||||
$row['projected_price'] = $wartosc*-1;
|
||||
}else{
|
||||
$row['projected_price'] = $row['stock_state_quantity_difference'] * $row['price'];
|
||||
}
|
||||
$id_array[] = $row;
|
||||
}
|
||||
|
||||
return $id_array;
|
||||
}
|
||||
|
||||
function getPriceInfo($p){
|
||||
$arr = array();
|
||||
// pobiera ilosci magazynowe danego produktu wraz z cena i id operacji magazynowej
|
||||
|
||||
$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['ecmproduct_id'] . "' and used='0' ORDER BY counter ASC");
|
||||
//echo "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['ecmproduct_id'] . "' and used='0' ORDER BY counter ASC<br><br>";
|
||||
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['ecmproduct_id'] . "' and deleted='0' ORDER BY counter ASC");
|
||||
$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 ($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;
|
||||
}
|
||||
}
|
||||
$avg_pq = 0;
|
||||
$avg_q = 0;
|
||||
return $rr;
|
||||
}
|
||||
|
||||
|
||||
function create_ks_documents($ks_date_document){
|
||||
global $current_user;
|
||||
$produkty_minus = Array();
|
||||
$produkty_plus = Array();
|
||||
$total_minus = 0;
|
||||
$total_plus = 0;
|
||||
//Dzielimy produkty na minus i plus
|
||||
$minus_pozycja = 0;
|
||||
$plus_pozycja = 0;
|
||||
|
||||
// Sprawdzamy date podana czy moze byc;
|
||||
$db=$GLOBALS['db'];
|
||||
$uq=$db->query("SELECT MAX(register_date) AS date FROM ecmstockdoccorrects WHERE stock_id='".$this->stock_id."' and deleted=0");
|
||||
$rul = $db->fetchByAssoc($uq);
|
||||
|
||||
$datetime2 = new DateTime($ks_date_document);
|
||||
$datetime1 = new DateTime($rul['date']);
|
||||
$interval = $datetime1->diff($datetime2);
|
||||
|
||||
if($interval->format('%R%a') >= 0){
|
||||
|
||||
}else{
|
||||
return -2;
|
||||
}
|
||||
|
||||
$states=array();
|
||||
foreach($this->position_list as $key => $pozycja){
|
||||
if( $pozycja['stock_state_quantity_difference'] < 0){
|
||||
$pozycja['quantity'] = $pozycja['stock_state_quantity_difference'];
|
||||
$pozycja['product_id'] = $pozycja['ecmproduct_id'];
|
||||
$pozycja['unit_id'] = $pozycja['dd_unit_id'];
|
||||
$pozycja['unit_name'] = $pozycja['dd_unit_name'];
|
||||
$pozycja['product_code'] = $pozycja['code'];
|
||||
$pozycja['position'] = $minus_pozycja;
|
||||
$produkty_minus[] = $pozycja;
|
||||
$total_minus += $pozycja['stock_state_quantity_difference'] * $pozycja['price'];
|
||||
$minus_pozycja++;
|
||||
|
||||
} else if( $pozycja['stock_state_quantity_difference'] > 0){
|
||||
$pozycja['quantity'] = $pozycja['stock_state_quantity_difference'];
|
||||
$pozycja['product_id'] = $pozycja['ecmproduct_id'];
|
||||
$pozycja['unit_id'] = $pozycja['dd_unit_id'];
|
||||
$pozycja['unit_name'] = $pozycja['dd_unit_name'];
|
||||
$pozycja['product_code'] = $pozycja['code'];
|
||||
$pozycja['position'] = $plus_pozycja;
|
||||
$produkty_plus[] = $pozycja;
|
||||
$total_plus += $pozycja['stock_state_quantity_difference'] * $pozycja['price'];
|
||||
$plus_pozycja++;
|
||||
}
|
||||
$states[$pozycja['ecmproduct_id']]['stock_state']=$pozycja['stock_state'];
|
||||
}
|
||||
|
||||
//Korekta Minus
|
||||
//Sprawdzamy czy sa produkty na minus
|
||||
$minusik = false;
|
||||
if(count($produkty_minus)>0){
|
||||
$EcmStockDocCorrectMinus = new EcmStockDocCorrect();
|
||||
$EcmStockDocCorrectMinus->type = '7bb903d0-c296-7d1b-6e50-54c209e30850';
|
||||
$EcmStockDocCorrectMinus->pdf_text = 'Do dokumentu remanentu nr: ' . $this->document_no . ' z dnia ' . $this->register_date;
|
||||
$EcmStockDocCorrectMinus->name = 'Korekta minus do dokumentu remanetntu: ' . $this->document_no;
|
||||
$EcmStockDocCorrectMinus->created_by = $current_user->id;
|
||||
$EcmStockDocCorrectMinus->assigned_user_id = $current_user->id;
|
||||
$EcmStockDocCorrectMinus->modified_user_id = $current_user->id;
|
||||
$EcmStockDocCorrectMinus->register_date = $ks_date_document;
|
||||
$EcmStockDocCorrectMinus->stock_id = $this->stock_id;
|
||||
$EcmStockDocCorrectMinus->total = $total_minus;
|
||||
$EcmStockDocCorrectMinus->description = "Renament_".$this->document_no;
|
||||
$EcmStockDocCorrectMinus->position_list = $produkty_minus;
|
||||
$this->ecmstockdoccorrects_id_minus = $EcmStockDocCorrectMinus->save();
|
||||
$minusik = true;
|
||||
}
|
||||
|
||||
|
||||
//Korekta Plus
|
||||
//Sprawdzamy czy jest korekta na plus
|
||||
$plusik = false;
|
||||
if(count($produkty_plus)>0){
|
||||
$EcmStockDocCorrectPlus = new EcmStockDocCorrect();
|
||||
$EcmStockDocCorrectPlus->type = '8a6b804b-fac7-5cc2-de19-54c209116b19';
|
||||
$EcmStockDocCorrectPlus->pdf_text = 'Do dokumentu remanentu nr: ' . $this->document_no . ' z dnia ' . $this->register_date;
|
||||
$EcmStockDocCorrectPlus->name = 'Korekta plus do dokumentu remanetntu: ' . $this->document_no;
|
||||
$EcmStockDocCorrectPlus->created_by = $current_user->id;
|
||||
$EcmStockDocCorrectPlus->assigned_user_id = $current_user->id;
|
||||
$EcmStockDocCorrectPlus->modified_user_id = $current_user->id;
|
||||
$EcmStockDocCorrectPlus->register_date = $ks_date_document;
|
||||
$EcmStockDocCorrectPlus->stock_id = $this->stock_id;
|
||||
$EcmStockDocCorrectPlus->total = $total_plus;
|
||||
$EcmStockDocCorrectPlus->description = "Renament_".$this->document_no;
|
||||
$EcmStockDocCorrectPlus->position_list = $produkty_plus;
|
||||
$this->ecmstockdoccorrects_id_plus = $EcmStockDocCorrectPlus->save();
|
||||
$plusik = true;
|
||||
}
|
||||
if($minusik || $plusik){
|
||||
|
||||
$this->status = 'implemented';
|
||||
$this->save();
|
||||
$this->position_list=$this->getPositionList();
|
||||
foreach($this->position_list as $key => $pozycja){
|
||||
|
||||
$this->db->query("update ecminventoryitems set stock_state='".$states[$pozycja['ecmproduct_id']]['stock_state']."' where id='".$pozycja['id']."'");
|
||||
}
|
||||
|
||||
return 1;
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
60
modules/EcmInventorys/EditView.php
Executable file
60
modules/EcmInventorys/EditView.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
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/EcmInventorys/EcmInventory.php');
|
||||
require_once ('include/time.php');
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
// $cq=$current_user->getPreference('confirm_quotes');
|
||||
|
||||
$new_number = false;
|
||||
$duplicate = false;
|
||||
$focus = new EcmInventory ();
|
||||
|
||||
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)) {
|
||||
if($row['id']==$focus->stock_id){$selected='selected';} else {
|
||||
$selected='';}
|
||||
$stock_body.='<option value="'.$row['id'].'" '.$selected.'>'.$row['name'].'</option>';
|
||||
}
|
||||
$stock.=$stock_body.'</select><input id="stock_id" name="stock_id" type="hidden" value="'.$focus->stock_id.'"/>';
|
||||
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
require_once ('modules/EcmInventorys/views/EditView/view.edit.ecminventorys.php');
|
||||
$edit = new ViewEditEcmInventorys ();
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
$edit->module = 'EcmInventorys';
|
||||
$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 ();
|
||||
110
modules/EcmInventorys/Menu.php
Executable file
110
modules/EcmInventorys/Menu.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?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('EcmInventorys', "edit", true)) $module_menu [] =
|
||||
Array("index.php?module=".'EcmInventorys'."&action=EditView&return_module=".'EcmInventorys'."&return_action=DetailView",
|
||||
translate('LNK_NEW_'.'ECMSTOCKDOCINSIDEIN', 'EcmInventorys'),"CreateEcmInventorys", 'EcmInventorys');
|
||||
|
||||
if(ACLController::checkAccess('EcmInventorys', "list", true)) $module_menu [] =
|
||||
Array("index.php?module=EcmInventorys&action=index&return_module=EcmInventorys&return_action=DetailView",
|
||||
translate('LNK_ECMSTOCKDOCINSIDEINS_LIST','EcmInventorys'),"EcmInventorys", 'EcmInventorys');
|
||||
|
||||
?>
|
||||
|
||||
9
modules/EcmInventorys/PDFTemplate/types.php
Executable file
9
modules/EcmInventorys/PDFTemplate/types.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
global $pdf_types;
|
||||
$pdf_types = array(
|
||||
'0' => 'Niedobory',
|
||||
'1' => 'Nadwyżki',
|
||||
'2' => 'Różnice',
|
||||
'3' => 'Wszystko',
|
||||
);
|
||||
?>
|
||||
647
modules/EcmInventorys/ajax.php
Executable file
647
modules/EcmInventorys/ajax.php
Executable file
@@ -0,0 +1,647 @@
|
||||
<?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 'AutocompliteProductCode' : AutocompliteProductCode($_POST['code'], $_POST['stock_id']); break;
|
||||
case 'AutocompliteProductName' : AutocompliteProductName($_POST['name'], $_POST['stock_id']); break;
|
||||
case 'getProductListById' : getProductListById($_POST['id_list'], $_POST['stock_id']); break;
|
||||
case 'add_from_stock' : add_from_stock($_POST['stock_id'],$_POST['add_options'],$_POST['rewrite_state']); break;
|
||||
case 'getPositionList' : getPositionList($_POST['ecminventory_id']); break;
|
||||
case 'savePositionList' : savePositionList($_POST['ecminventory_id'], $_POST['data'],$_POST['deleteOld']); break;
|
||||
case 'create_ks_documents' : create_ks_documents($_POST['ecminventory_id'], $_POST['ks_date_document']); break;
|
||||
case 'createEcmInventory' : createEcmInventory($_POST['name'], $_POST['document_no'], $_POST['stock_id'], $_POST['register_date'], $_POST['ecmproductstockindex_id'], $_POST['pdf_text']); break;
|
||||
}
|
||||
|
||||
function create_ks_documents($id_dokumentu, $ks_date_document){
|
||||
include_once('modules/EcmStockDocCorrects/EcmStockDocCorrect.php');
|
||||
global $db, $current_user;
|
||||
$EcmInventory = new EcmInventory();
|
||||
$EcmInventory->retrieve($id_dokumentu);
|
||||
$tmp = $EcmInventory->create_ks_documents($ks_date_document);
|
||||
|
||||
print json_encode($tmp);
|
||||
}
|
||||
|
||||
function createEcmInventory($name, $document_no, $stock_id, $register_date, $ecmproductstockindex_id, $pdf_text){
|
||||
$EcmInventory = new EcmInventory();
|
||||
$EcmInventory->name = $name;
|
||||
$EcmInventory->document_no = $document_no;
|
||||
$EcmInventory->stock_id = $stock_id;
|
||||
$EcmInventory->register_date = $register_date;
|
||||
$EcmInventory->ecmproductstockindex_id = $ecmproductstockindex_id;
|
||||
$EcmInventory->pdf_text = $pdf_text;
|
||||
$id = $EcmInventory->save();
|
||||
print json_encode($id);
|
||||
}
|
||||
|
||||
function savePositionList($ecminventory_id, $data, $delte_old_values){
|
||||
$db = $GLOBALS ['db'];
|
||||
if($ecminventory_id==''){
|
||||
|
||||
|
||||
}else{
|
||||
if($delte_old_values == 'true'){
|
||||
$del_query = "DELETE FROM ecminventoryitems WHERE ecminventory_id = '" . $ecminventory_id ."'";
|
||||
$db->query($del_query);
|
||||
}
|
||||
global $current_user, $app_list_strings;
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
if ($value ['ecmproduct_id'] == '') {
|
||||
continue;
|
||||
}
|
||||
$item_id = create_guid();
|
||||
|
||||
// $_POST ['price'] = unformat_number( $_POST ['price']);
|
||||
// $_POST ['quantity'] = unformat_number( $_POST ['quantity']);
|
||||
|
||||
$arr = array (
|
||||
'id' => $item_id,
|
||||
'date_entered' => 'NOW()',
|
||||
'date_modified' => 'NOW()',
|
||||
'modified_user_id' => $current_user->id,
|
||||
'assigned_user_id' => $current_user->id,
|
||||
'created_by' => $current_user->id,
|
||||
'deleted' => '0',
|
||||
'position' => $key,
|
||||
strtolower ('EcmInventory') . '_id' => $ecminventory_id,
|
||||
'ecmproduct_id' => $value ['ecmproduct_id'],
|
||||
'position' => $value,
|
||||
'code' => $value['code'],
|
||||
'name' => $value ['name'],
|
||||
'price'=> $value ['price'],
|
||||
'total'=> ROUND($value ['price'] * $value ['quantity'],2),
|
||||
'quantity' => $value ['quantity'],
|
||||
'dd_unit_id' => $value ['dd_unit_id'],
|
||||
'dd_unit_name' => $app_list_strings['ecmproducts_unit_dom'][$value ['dd_unit_id']],
|
||||
'ecmproductcategory_id' => $value ['ecmproductcategory_id'],
|
||||
//'is_consignment' => $p['product_is_consignment'],
|
||||
);
|
||||
$keys = array_keys($arr);
|
||||
$values = array_values($arr);
|
||||
$inster_query = 'INSERT INTO ecminventoryitems (' . implode(",",$keys) .') VALUES ("' . implode('","',$values) . '");';
|
||||
$inster_query = str_replace ( '"NOW()"', 'NOW()', $inster_query );
|
||||
$db->query ($inster_query);
|
||||
}
|
||||
}
|
||||
//print json_encode($inster_query);
|
||||
}
|
||||
|
||||
function getPositionList($ecminventory_id){
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT ecmproduct_id, quantity,stock_state FROM ecminventoryitems WHERE ecminventory_id ="' . $ecminventory_id . '";';
|
||||
|
||||
$rs = $db->query($q);
|
||||
$quantity_array = array();
|
||||
$id_array = array();
|
||||
$states=array();
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$id_array[] = $row['ecmproduct_id'];
|
||||
$quantity_array[$row['ecmproduct_id']] = $row['quantity'];
|
||||
$states[$row['ecmproduct_id']]=$row['stock_state'];
|
||||
}
|
||||
$inv = new EcmInventory();
|
||||
$inv->retrieve($ecminventory_id);
|
||||
|
||||
if(count($id_array)==0){
|
||||
$result = null;
|
||||
}else{
|
||||
$query_stock_id = 'SELECT stock_id FROM ecminventorys WHERE id ="' . $ecminventory_id . '";';
|
||||
$result_stock_id = $db->query($query_stock_id);
|
||||
$stock_id = $row = $db->fetchByAssoc($result_stock_id);
|
||||
$tmp = getProductListById($id_array, $stock_id['stock_id'] ,false ,true);
|
||||
foreach($tmp as $k => $v){
|
||||
$tmp[$k]['quantity'] = $quantity_array[$v['ecmproduct_id']];
|
||||
$tmp[$k]['difference'] = $tmp[$k]['quantity'] - $tmp[$k]['stock_state'];
|
||||
if($inv->status=='implemented'){
|
||||
|
||||
$tmp[$k]['stock_state']=$states[$v['ecmproduct_id']];
|
||||
$tmp[$k]['difference'] = $tmp[$k]['quantity'] - $states[$v['ecmproduct_id']];
|
||||
}
|
||||
}
|
||||
$json = json_encode($tmp);
|
||||
print $json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function add_from_stock($stock_id, $add_options, $rewrite_state){
|
||||
$db = $GLOBALS ['db'];
|
||||
if($add_options=='all_positions'){
|
||||
$q = 'SELECT product_id FROM ecmstockoperations WHERE stock_id ="' . $stock_id . '" AND deleted = 0 group by product_id;';
|
||||
$id_array = array();
|
||||
$rs = $db->query($q);
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$id_array[] = $row['product_id'];
|
||||
}
|
||||
getProductListById($id_array,$stock_id,$rewrite_state);
|
||||
}else if($add_options=='not_eq_zero'){
|
||||
$qplus = 'SELECT
|
||||
product_id, SUM(quantity) as quantity
|
||||
FROM
|
||||
ecmstockoperations
|
||||
WHERE
|
||||
stock_id ="' . $stock_id . '" AND type=0 AND deleted = 0
|
||||
GROUP BY
|
||||
product_id;';
|
||||
$qminus = 'SELECT
|
||||
product_id, SUM(quantity) as quantity
|
||||
FROM
|
||||
ecmstockoperations
|
||||
WHERE
|
||||
stock_id ="' . $stock_id . '" AND type=1 AND deleted = 0
|
||||
GROUP BY
|
||||
product_id;';
|
||||
|
||||
$product_array = array();
|
||||
$id_array = array();
|
||||
$rs = $db->query($qplus);
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$product_array[$row['product_id']] = $row['quantity'];
|
||||
}
|
||||
$rs = $db->query($qminus);
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$product_array[$row['product_id']] -= $row['quantity'];
|
||||
}
|
||||
foreach($product_array as $key => $value){
|
||||
if($value>0){
|
||||
$id_array[] = $key;
|
||||
}
|
||||
}
|
||||
getProductListById($id_array,$stock_id, $rewrite_state);
|
||||
}else if($add_options=='eq_zero'){
|
||||
$qplus = 'SELECT
|
||||
product_id, SUM(quantity) as quantity
|
||||
FROM
|
||||
ecmstockoperations
|
||||
WHERE
|
||||
stock_id ="' . $stock_id . '" AND type=0 AND deleted = 0
|
||||
GROUP BY
|
||||
product_id;';
|
||||
$qminus = 'SELECT
|
||||
product_id, SUM(quantity) as quantity
|
||||
FROM
|
||||
ecmstockoperations
|
||||
WHERE
|
||||
stock_id ="' . $stock_id . '" AND type=1 AND deleted = 0
|
||||
GROUP BY
|
||||
product_id;';
|
||||
$product_array = array();
|
||||
$id_array = array();
|
||||
$rs = $db->query($qplus);
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$product_array[$row['product_id']] = $row['quantity'];
|
||||
}
|
||||
$rs = $db->query($qminus);
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$product_array[$row['product_id']] -= $row['quantity'];
|
||||
}
|
||||
foreach($product_array as $key => $value){
|
||||
if($value<=0){
|
||||
$id_array[] = $key;
|
||||
}
|
||||
}
|
||||
getProductListById($id_array,$stock_id,$rewrite_state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getProductListById($id_list, $stock_id, $rewrite_state = false, $return_array = false){
|
||||
global $current_language;
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = '
|
||||
SELECT
|
||||
product.id AS id,
|
||||
product.name AS name,
|
||||
product.code AS code,
|
||||
product.product_category_id AS product_category_id,
|
||||
product_category.name AS product_category_name,
|
||||
product.unit_id AS dd_unit_id
|
||||
FROM
|
||||
ecmproducts AS product
|
||||
LEFT JOIN
|
||||
ecmproductcategories AS product_category ON product.product_category_id = product_category.id
|
||||
WHERE
|
||||
product.deleted = 0
|
||||
AND product.id IN ("' . implode('","',$id_list) .'")
|
||||
ORDER BY product.code, product.name';
|
||||
$result = array();
|
||||
$rs = $db->query($q);
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$a_json_row ['ecmproduct_id'] = $row ['id'];
|
||||
$a_json_row ['name'] = $row ['name'];
|
||||
$a_json_row ['code'] = $row ['code'];
|
||||
$a_json_row ['product_category_id'] = $row ['product_category_id'];
|
||||
$a_json_row ['product_category_name'] = $row ['product_category_name'];
|
||||
$a_json_row ['dd_unit_id'] = $row ['dd_unit_id'];
|
||||
$a_json_row ['dd_unit_precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$row ['dd_unit_id']];
|
||||
$a_json_row ['dd_unit_name'] = $app_list_strings['ecmproducts_unit_dom'][$row ['dd_unit_id']];
|
||||
//Cena zakupu
|
||||
$price_query = '
|
||||
SELECT
|
||||
price
|
||||
FROM
|
||||
ecmstockdocins
|
||||
LEFT JOIN
|
||||
ecmstockdocinitems ON ecmstockdocins.id = ecmstockdocinitems.ecmstockdocin_id
|
||||
WHERE ecmstockdocinitems.ecmproduct_id = "' . $row ['id'] . '"
|
||||
AND ecmstockdocins.deleted =0
|
||||
ORDER BY ecmstockdocins.register_date DESC, ecmstockdocins.document_no DESC, ecmstockdocinitems.position DESC
|
||||
LIMIT 1;';
|
||||
$price_result = $db->query($price_query);
|
||||
if($price_result->num_rows > 0){
|
||||
$price_row = $db->fetchByAssoc($price_result);
|
||||
$a_json_row ['price'] = $price_row['price'];
|
||||
}else{
|
||||
$a_json_row ['price'] = 0;
|
||||
}
|
||||
//Stan magazynowy
|
||||
$a_json_row['stock_state'] = EcmStockOperation::getStock($row['id'], $stock_id);
|
||||
if($rewrite_state=="true"){
|
||||
$a_json_row['quantity'] = $a_json_row['stock_state'];
|
||||
}else{
|
||||
$a_json_row['quantity'] = 0;
|
||||
}
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
if(!$return_array){
|
||||
$json = json_encode($result);
|
||||
print $json;
|
||||
}else{
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
function AutocompliteProductCode($code,$stock_id){
|
||||
global $current_language;
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$db = $GLOBALS ['db'];
|
||||
$result = array();
|
||||
$q = '
|
||||
SELECT
|
||||
product.id AS id,
|
||||
product.name AS name,
|
||||
product.code AS code,
|
||||
product.product_category_id AS product_category_id,
|
||||
product_category.name AS product_category_name,
|
||||
product.unit_id AS dd_unit_id
|
||||
FROM
|
||||
ecmproducts AS product
|
||||
LEFT JOIN
|
||||
ecmproductcategories AS product_category ON product.product_category_id = product_category.id
|
||||
WHERE
|
||||
product.deleted = 0
|
||||
AND product.code LIKE "%' . $code .'%"
|
||||
ORDER BY product.code, product.name
|
||||
LIMIT 10;';
|
||||
$rs = $db->query($q);
|
||||
if ($rs->num_rows > 0) {
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$a_json_row ['id'] = $row ['id'];
|
||||
$a_json_row ['name'] = $row ['name'];
|
||||
$a_json_row ['code'] = $row ['code'];
|
||||
$a_json_row ['product_category_id'] = $row ['product_category_id'];
|
||||
$a_json_row ['product_category_name'] = $row ['product_category_name'];
|
||||
$a_json_row ['dd_unit_id'] = $row ['dd_unit_id'];
|
||||
$a_json_row ['dd_unit_precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$row ['dd_unit_id']];
|
||||
$a_json_row ['dd_unit_name'] = $app_list_strings['ecmproducts_unit_dom'][$row ['dd_unit_id']];
|
||||
$a_json_row ['label'] = "Kategoria: <span style='color: blue;'>" . $a_json_row ['product_category_name'] . "</span><br>Indeks: <span style='color: blue;'>" . $row ['code'] . "</span><br>Nazwa: <span style='color: blue;'>" . $row ['name'] . '</span>';
|
||||
$a_json_row ['value'] = $row ['code'];
|
||||
//Cena zakupu
|
||||
$price_query = '
|
||||
SELECT
|
||||
price
|
||||
FROM
|
||||
ecmstockdocins
|
||||
LEFT JOIN
|
||||
ecmstockdocinitems ON ecmstockdocins.id = ecmstockdocinitems.ecmstockdocin_id
|
||||
WHERE ecmstockdocinitems.ecmproduct_id = "' . $row ['id'] . '"
|
||||
ORDER BY ecmstockdocins.register_date DESC
|
||||
LIMIT 1;';
|
||||
$price_result = $db->query($price_query);
|
||||
if($price_result->num_rows > 0){
|
||||
$price_row = $db->fetchByAssoc($price_result);
|
||||
$a_json_row ['price'] = $price_row['price'];
|
||||
}else{
|
||||
$a_json_row ['price'] = 0;
|
||||
}
|
||||
//Stan magazynowy
|
||||
$a_json_row['stock_state'] = EcmStockOperation::getStock($row['id'], $stock_id);
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
} else {
|
||||
$a_json_row ['id'] = '';
|
||||
$a_json_row ['name'] = '';
|
||||
$a_json_row ['code'] = '';
|
||||
$a_json_row ['product_category_id'] = '';
|
||||
$a_json_row ['product_category_name'] = '';
|
||||
$a_json_row ['dd_unit_id'] = '';
|
||||
$a_json_row ['dd_unit_name'] = '';
|
||||
$a_json_row ['price'] = '';
|
||||
$a_json_row ['label'] = "<span style='color: red;'>Brak czynności o szukanej nazwie</span>";
|
||||
$a_json_row ['value'] = '';
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
$json = json_encode($result);
|
||||
print $json;
|
||||
}
|
||||
|
||||
function AutocompliteProductName($name,$stock_id){
|
||||
global $current_language;
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$db = $GLOBALS ['db'];
|
||||
$result = array();
|
||||
$q = '
|
||||
SELECT
|
||||
product.id AS id,
|
||||
product.name AS name,
|
||||
product.code AS code,
|
||||
product.product_category_id AS product_category_id,
|
||||
product_category.name AS product_category_name,
|
||||
product.unit_id AS dd_unit_id
|
||||
FROM
|
||||
ecmproducts AS product
|
||||
LEFT JOIN
|
||||
ecmproductcategories AS product_category ON product.product_category_id = product_category.id
|
||||
WHERE
|
||||
product.deleted = 0
|
||||
AND product.name LIKE "%' . $name .'%"
|
||||
ORDER BY product.name, product.code
|
||||
LIMIT 10;';
|
||||
$rs = $db->query($q);
|
||||
if ($rs->num_rows > 0) {
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$a_json_row ['id'] = $row ['id'];
|
||||
$a_json_row ['name'] = $row ['name'];
|
||||
$a_json_row ['code'] = $row ['code'];
|
||||
$a_json_row ['product_category_id'] = $row ['product_category_id'];
|
||||
$a_json_row ['product_category_name'] = $row ['product_category_name'];
|
||||
$a_json_row ['dd_unit_id'] = $row ['dd_unit_id'];
|
||||
$a_json_row ['dd_unit_name'] = $app_list_strings['ecmproducts_unit_dom'][$row ['dd_unit_id']];
|
||||
$a_json_row ['dd_unit_precision'] = $app_list_strings['ecmproducts_unit_dom_precision'][$row ['dd_unit_id']];
|
||||
$a_json_row ['label'] = "Kategoria: <span style='color: blue;'>" . $a_json_row ['product_category_name'] . "</span><br>Indeks: <span style='color: blue;'>" . $row ['code'] . "</span><br>Nazwa: <span style='color: blue;'>" . $row ['name'] . '</span>';
|
||||
$a_json_row ['value'] = $row ['name'];
|
||||
//Cena zakupu
|
||||
$price_query = '
|
||||
SELECT
|
||||
price
|
||||
FROM
|
||||
ecmstockdocins
|
||||
LEFT JOIN
|
||||
ecmstockdocinitems ON ecmstockdocins.id = ecmstockdocinitems.ecmstockdocin_id
|
||||
WHERE ecmstockdocinitems.ecmproduct_id = "' . $row ['id'] . '"
|
||||
ORDER BY ecmstockdocins.register_date DESC
|
||||
LIMIT 1;';
|
||||
$price_result = $db->query($price_query);
|
||||
if($price_result->num_rows > 0){
|
||||
$price_row = $db->fetchByAssoc($price_result);
|
||||
$a_json_row ['price'] = $price_row['price'];
|
||||
}else{
|
||||
$a_json_row ['price'] = 0;
|
||||
}
|
||||
//Stan magazynowy
|
||||
$a_json_row['stock_state'] = EcmStockOperation::getStock($row['id'], $stock_id);
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
} else {
|
||||
$a_json_row ['id'] = '';
|
||||
$a_json_row ['name'] = '';
|
||||
$a_json_row ['code'] = '';
|
||||
$a_json_row ['product_category_id'] = '';
|
||||
$a_json_row ['product_category_name'] = '';
|
||||
$a_json_row ['dd_unit_id'] = '';
|
||||
$a_json_row ['dd_unit_name'] = '';
|
||||
$a_json_row ['price'] = '';
|
||||
$a_json_row ['label'] = "<span style='color: red;'>Brak czynności o szukanej nazwie</span>";
|
||||
$a_json_row ['value'] = '';
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
$json = json_encode($result);
|
||||
print $json;
|
||||
}
|
||||
|
||||
function generateNumber($mag,$date) {
|
||||
$data = array();
|
||||
$data['number'] = EcmInventory::generateNumber($date);
|
||||
$data['document_no'] = EcmInventory::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.is_consignment, p.id, p.code, p.name, p.unit_id, p.product_category_id 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 EcmInventory();
|
||||
$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'];
|
||||
$tmp['module']='EcmPrices';
|
||||
$tmp['visible']='1';
|
||||
$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'] = '<a href="index.php?module=EcmInvoiceOuts&action=DetailView&record='.$res['id'].'">'.$res['document_no'].'</a>';
|
||||
$tmp['price'] = $res['subprice'];
|
||||
$tmp['module']='EcmInvoiceOuts';
|
||||
$tmp['visible']='1';
|
||||
$result[] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
//get from ecmstockdocins
|
||||
$res = $db->query("SELECT ii.price, i.id, i.document_no,ii.quantity,i.register_date FROM ecmstockdocinitems AS ii
|
||||
INNER JOIN ecmstockdocins AS i
|
||||
ON ii.ecmstockdocin_id=i.id
|
||||
WHERE ii.ecmproduct_id='$product_id'
|
||||
AND ii.deleted='0'
|
||||
AND i.deleted='0'
|
||||
ORDER BY i.register_date DESC");
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['name'] = '<a href="index.php?module=EcmStockDocIns&action=DetailView&record='.$row['id'].'">'.$row['document_no'].'</a>';
|
||||
$tmp['price'] = $row['price'];
|
||||
$tmp['module']='EcmStockDocIns';
|
||||
$tmp['quantity']=$row['quantity'];
|
||||
$tmp['register_date']=$row['register_date'];
|
||||
$tmp['visible']='0';
|
||||
$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;
|
||||
}
|
||||
|
||||
39
modules/EcmInventorys/createPDF.php
Executable file
39
modules/EcmInventorys/createPDF.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
ini_set('memory_limit','2000M');
|
||||
if (!$_REQUEST ['record'] || $_REQUEST ['record'] == '')
|
||||
die('Brak rekordu');
|
||||
else
|
||||
$record = $_REQUEST ['record'];
|
||||
|
||||
global $mod_strings, $app_list_strings;
|
||||
include_once ("include/MPDF57/mpdf.php");
|
||||
|
||||
$EcmSysInfo = new EcmSysInfo();
|
||||
$EcmInventory = new EcmInventory ();
|
||||
$EcmInventory->retrieve($record);
|
||||
|
||||
$user = new User ();
|
||||
$user->retrieve($EcmInventory->assigned_user_id);
|
||||
|
||||
$EcmStock = new EcmStock();
|
||||
$EcmStock->retrieve($EcmInventory->stock_id);
|
||||
|
||||
$smarty = new Sugar_Smarty ();
|
||||
$smarty->assign("MOD", $mod_strings);
|
||||
$smarty->assign("APP_LIST_STRINGS", $app_list_strings);
|
||||
$smarty->assign("EcmSysInfo", $EcmSysInfo);
|
||||
$smarty->assign("EcmInventory", $EcmInventory);
|
||||
$smarty->assign("EcmStock", $EcmStock);
|
||||
|
||||
switch($_REQUEST['pdf_type']){
|
||||
case '0': $content = $smarty->fetch('modules/EcmInventorys/PDFTemplate/niedobory.tpl'); break;
|
||||
case '1': $content = $smarty->fetch('modules/EcmInventorys/PDFTemplate/nadwyzki.tpl'); break;
|
||||
case '2': $content = $smarty->fetch('modules/EcmInventorys/PDFTemplate/roznice.tpl'); break;
|
||||
case '3': $content = $smarty->fetch('modules/EcmInventorys/PDFTemplate/wszystko.tpl'); break;
|
||||
}
|
||||
$mPDF = new mPDF ( 'pl', 'A4', 10, 'arial', 10, 10,30, 45, 5, 5);
|
||||
$mPDF->setAutoTopMargi = 'stretch';
|
||||
$mPDF->setAutoBottomMargin = 'stretch';
|
||||
$mPDF->mirrorMargins = 1;
|
||||
$mPDF->WriteHTML($content);
|
||||
$mPDF->Output();
|
||||
279
modules/EcmInventorys/javascript/helper.php
Executable file
279
modules/EcmInventorys/javascript/helper.php
Executable file
@@ -0,0 +1,279 @@
|
||||
<?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 'AutocompliteProductCode' : AutocompliteProductCode($_POST['code']); break;
|
||||
}
|
||||
|
||||
function AutocompliteProductCode($code){
|
||||
global $current_language;
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$db = $GLOBALS ['db'];
|
||||
$result = array();
|
||||
$q = '
|
||||
SELECT
|
||||
product.id AS id,
|
||||
product.name AS name,
|
||||
product.code AS code,
|
||||
product.product_category_id AS product_category_id,
|
||||
product_category.name AS product_category_name,
|
||||
product.unit_id AS dd_unit_id
|
||||
FROM
|
||||
ecmproducts AS product
|
||||
LEFT JOIN
|
||||
ecmproductcategories AS product_category ON product.product_category_id = product_category.id
|
||||
WHERE
|
||||
product.deleted = 0
|
||||
AND product.code LIKE "%' . $code .'%";';
|
||||
$rs = $db->query($q);
|
||||
if ($rs->num_rows > 0) {
|
||||
while ($row = $db->fetchByAssoc($rs)) {
|
||||
$a_json_row ['id'] = $row ['id'];
|
||||
$a_json_row ['name'] = $row ['name'];
|
||||
$a_json_row ['code'] = $row ['code'];
|
||||
$a_json_row ['product_category_id'] = $row ['product_category_id'];
|
||||
$a_json_row ['product_category_name'] = $row ['product_category_name'];
|
||||
$a_json_row ['dd_unit_id'] = $row ['dd_unit_id'];
|
||||
$a_json_row ['label'] = "Kategoria: <span style='color: blue;'>" . $a_json_row ['product_category_name'] . "</span><br>Indeks: <span style='color: blue;'>" . $row ['code'] . "</span><br>Nazwa: <span style='color: blue;'>" . $row ['name'] . '</span>';
|
||||
$a_json_row ['value'] = '';
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
} else {
|
||||
$a_json_row ['id'] = '';
|
||||
$a_json_row ['name'] = '';
|
||||
$a_json_row ['indeks'] = '';
|
||||
$a_json_row ['time'] = '';
|
||||
$a_json_row ['cost_action'] = '';
|
||||
$a_json_row ['cost_hour'] = '';
|
||||
$a_json_row ['category'] = '';
|
||||
$a_json_row ["label"] = "<span style='color: red;'>Brak czynności o szukanej nazwie</span>";
|
||||
$a_json_row ['value'] = '';
|
||||
$result [] = $a_json_row;
|
||||
}
|
||||
$json = json_encode($result);
|
||||
print $json;
|
||||
}
|
||||
|
||||
function generateNumber($mag,$date) {
|
||||
$data = array();
|
||||
$data['number'] = EcmInventory::generateNumber($date);
|
||||
$data['document_no'] = EcmInventory::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.is_consignment, p.id, p.code, p.name, p.unit_id, p.product_category_id 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 EcmInventory();
|
||||
$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'];
|
||||
$tmp['module']='EcmPrices';
|
||||
$tmp['visible']='1';
|
||||
$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'] = '<a href="index.php?module=EcmInvoiceOuts&action=DetailView&record='.$res['id'].'">'.$res['document_no'].'</a>';
|
||||
$tmp['price'] = $res['subprice'];
|
||||
$tmp['module']='EcmInvoiceOuts';
|
||||
$tmp['visible']='1';
|
||||
$result[] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
//get from ecmstockdocins
|
||||
$res = $db->query("SELECT ii.price, i.id, i.document_no,ii.quantity,i.register_date FROM ecmstockdocinitems AS ii
|
||||
INNER JOIN ecmstockdocins AS i
|
||||
ON ii.ecmstockdocin_id=i.id
|
||||
WHERE ii.ecmproduct_id='$product_id'
|
||||
AND ii.deleted='0'
|
||||
AND i.deleted='0'
|
||||
ORDER BY i.register_date DESC");
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['name'] = '<a href="index.php?module=EcmStockDocIns&action=DetailView&record='.$row['id'].'">'.$row['document_no'].'</a>';
|
||||
$tmp['price'] = $row['price'];
|
||||
$tmp['module']='EcmStockDocIns';
|
||||
$tmp['quantity']=$row['quantity'];
|
||||
$tmp['register_date']=$row['register_date'];
|
||||
$tmp['visible']='0';
|
||||
$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;
|
||||
}
|
||||
|
||||
445
modules/EcmInventorys/language/en_us.lang.php
Executable file
445
modules/EcmInventorys/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/EcmInventorys/language/ge_ge.lang.php
Executable file
424
modules/EcmInventorys/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 (%)',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
201
modules/EcmInventorys/language/pl_pl.lang.php
Executable file
201
modules/EcmInventorys/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
$mod_strings = array (
|
||||
'LBL_STOCK_NAME' => 'Magazyn',
|
||||
'LBL_ECMPRICE' => 'Ceny B2B',
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'LBL_PDF_TEXT' => 'Opis',
|
||||
'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',
|
||||
'LBL_ECMPRODUCTSTOCKINDEX'=>'Kartoteka Materiałowa',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_DETAIL_BUTTON' => 'Szczegóły',
|
||||
// added 15.07.2009
|
||||
'LBL_EDITTABLE_UNIT' => 'J.m.',
|
||||
// added 09.02.2009
|
||||
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Pokaż obrazki w PDFie',
|
||||
'LBL_SHOW_RECIPIENT_CODE' => 'Pokaż kod odbiorcy',
|
||||
// FOR SYSTEM USE
|
||||
'LBL_MODULE_NAME' => 'Remanent',
|
||||
'LBL_MODULE_TITLE' => 'Remanent: Strona Główna',
|
||||
'LBL_MODULE_ID' => 'EcmInventorys',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie',
|
||||
'LBL_LIST_FORM_TITLE' => 'Dokumenty Remanentu',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowy Remanent',
|
||||
'LBL_DETAILS' => 'Szczegóły Remanentu',
|
||||
'LBL_ITEMS' => ' ',
|
||||
'LBL_TEXTS' => 'Teksty do PDFa:',
|
||||
'LNK_ECMSTOCKDOCINSIDEINS_LIST'=>'Lista Dokumentów Remanentu',
|
||||
'LNK_NEW_'.'ECMSTOCKDOCINSIDEIN'=>'Utwórz Dokument Remanentu',
|
||||
'LBL_PREVIEW' => 'Podglad PDFa:',
|
||||
'LBL_EMAIL' => 'Stwórz Email:',
|
||||
'LBL_TO_INFORMATIONS' => 'Informacje o firmie:',
|
||||
'LBL_DETAILS_TAB' => 'Szczegóły',
|
||||
'LBL_ITEMS_TAB' => 'Produkty',
|
||||
'LBL_TEXTS_TAB' => 'Teksty',
|
||||
'LBL_PREVIEW_TAB' => 'Podgląd',
|
||||
'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_ECMSTOCKDOCCORRECTS_ID_MINUS' => 'Korekta stanu minus',
|
||||
'LBL_ECMSTOCKDOCCORRECTS_ID_PLUS' => 'Korekta stanu plus',
|
||||
'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' => 'Państwo',
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
'LBL_TO_IS_VAT_FREE' => 'Czy jest wolne od vatu?',
|
||||
'LBL_HEADER_TEXT' => 'Tekst nagłó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 Płatności',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Warunki Płatności ID',
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Warunki Dostawy',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Warunki Dostawy ID',
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Błąd formatu numeru!',
|
||||
'LBL_SAVE_FORM_ERROR' => 'Wystepuja błędy na liscie produktów albo w formularzu!',
|
||||
'LBL_DISCOUNT_ERROR' => 'Błąd formatu upustu',
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Kod',
|
||||
'LBL_EDITTABLE_NAME' => 'Nazwa',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Ilość',
|
||||
'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órę',
|
||||
'LBL_MOVE_ROW_DOWN' => 'W dół',
|
||||
'LBL_INSERT_NEW_ROW' => 'Wstaw nowy wiersz',
|
||||
'LBL_DELETE_ROW' => 'Usuń wiersz',
|
||||
'LBL_VALIDTILL_DATE' => 'Ważne 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_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/EcmInventorys/metadata/SearchFields.php
Executable file
125
modules/EcmInventorys/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['EcmInventorys'] = 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' ),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
102
modules/EcmInventorys/metadata/detailviewdefs.php
Executable file
102
modules/EcmInventorys/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
global $app_list_strings;
|
||||
$viewdefs['EcmInventorys']['DetailView'] = array(
|
||||
'templateMeta' => array(
|
||||
'form' => array(
|
||||
'buttons' => array(
|
||||
'CANCEL_DOC',
|
||||
array(
|
||||
'customCode' => '{include file="modules/EcmInventorys/tpl/DetailView_edit_button.tpl"}'
|
||||
),
|
||||
array(
|
||||
'customCode' => "{include_php file='include/ECM/EcmCreatePdfButton.php'}"
|
||||
),
|
||||
array(
|
||||
'customCode' => '{include file="modules/EcmInventorys/tpl/DetailView_create_ks_button.tpl"}'
|
||||
),
|
||||
),
|
||||
'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="total_netto" name="total_netto" 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/EcmInventorys/javascript/EcmInventorysDetail.js'
|
||||
),
|
||||
)
|
||||
),
|
||||
'panels' => array(
|
||||
'LBL_DETAILS_TAB' => array(
|
||||
array(
|
||||
'document_no',
|
||||
'assigned_user_name'
|
||||
),
|
||||
array(
|
||||
'name',
|
||||
'stock_name'
|
||||
),
|
||||
array(
|
||||
'register_date',
|
||||
'ecmproductstockindex_name'
|
||||
),
|
||||
array(
|
||||
'status',
|
||||
array (
|
||||
'name' => 'ecmstockdoccorrects_id_plus',
|
||||
'label' => 'LBL_ECMSTOCKDOCCORRECTS_ID_PLUS',
|
||||
'allCols' => false,
|
||||
'hideLabel' => false,
|
||||
'customCode' => '<a href="index.php?module=EcmStockDocCorrects&action=DetailView&record={$fields.ecmstockdoccorrects_id_plus.value}">{$fields.ecmstockdoccorrects_name_plus.value}</a>',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'',
|
||||
array (
|
||||
'name' => 'ecmstockdoccorrects_id_minus',
|
||||
'label' => 'LBL_ECMSTOCKDOCCORRECTS_ID_MINUS',
|
||||
'allCols' => false,
|
||||
'hideLabel' => false,
|
||||
'customCode' => '<a href="index.php?module=EcmStockDocCorrects&action=DetailView&record={$fields.ecmstockdoccorrects_id_minus.value}">{$fields.ecmstockdoccorrects_name_minus.value}</a>',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'pdf_text'
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value}'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_ITEMS_TAB' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{include file="modules/EcmInventorys/tpl/DetailView_product_list.tpl"}'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
146
modules/EcmInventorys/metadata/editviewdefs.php
Executable file
146
modules/EcmInventorys/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,146 @@
|
||||
<?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 ['EcmInventorys'] ['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'
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/ECM/SearchProductTable.js',
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmInventorys/javascript/EcmInventorys.js',
|
||||
),
|
||||
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_DETAILS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'type' => 'tab',
|
||||
'active' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
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'=>'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' => '{include file="modules/EcmInventorys/tpl/EditView_product_list.tpl"}'
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
134
modules/EcmInventorys/metadata/listviewdefs.php
Executable file
134
modules/EcmInventorys/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<?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 ["EcmInventorys"] = array (
|
||||
'document_no' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
'NAME' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_NAME',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
'STOCK_ID' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_STOCK_NAME',
|
||||
'default' => true
|
||||
),
|
||||
'REGISTER_DATE' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_REGISTER_DATE',
|
||||
'default' => true,
|
||||
'sortable' => true
|
||||
),
|
||||
'STATUS' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_STATUS',
|
||||
'default' => true,
|
||||
'sortable' => true
|
||||
),
|
||||
|
||||
'ECMPRODUCTSTOCKINDEX_NAME' => array (
|
||||
// 'width' => '8',
|
||||
'label' => 'LBL_ECMPRODUCTSTOCKINDEX',
|
||||
'default' => true,
|
||||
'sortable' => true
|
||||
),
|
||||
|
||||
|
||||
'MODIFIED_BY_NAME' => array (
|
||||
// 'width' => '10',
|
||||
'label' => 'LBL_MODIFIED_USER',
|
||||
'module' => 'Users',
|
||||
'id' => 'USERS_ID',
|
||||
'default' => false,
|
||||
'sortable' => true,
|
||||
'related_fields' => array (
|
||||
'modified_user_id'
|
||||
)
|
||||
),
|
||||
'ECMSTOCKDOCCORRECTS_ID_MINUS' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_ECMSTOCKDOCCORRECTS_ID_MINUS',
|
||||
'default' => true,
|
||||
'sortable' => true
|
||||
),
|
||||
'ECMSTOCKDOCCORRECTS_ID_PLUS' => array (
|
||||
// 'width' => '5',
|
||||
'label' => 'LBL_ECMSTOCKDOCCORRECTS_ID_PLUS',
|
||||
'default' => true,
|
||||
'sortable' => true
|
||||
),
|
||||
|
||||
'PDF_TEXT' => array (
|
||||
// 'width' => '15',
|
||||
'label' => 'LBL_PDF_TEXT',
|
||||
'default' => false,
|
||||
'sortable' => true
|
||||
),
|
||||
/* 'OPTIONS' => array (
|
||||
// 'width' => '5px',
|
||||
'label' => 'PDF',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'center'
|
||||
) */
|
||||
);
|
||||
?>
|
||||
116
modules/EcmInventorys/metadata/searchdefs.php
Executable file
116
modules/EcmInventorys/metadata/searchdefs.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?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['EcmInventorys'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
'label' => '10',
|
||||
|
||||
'field' => '30'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'layout' => array (
|
||||
|
||||
'basic_search' => array (
|
||||
'document_no',
|
||||
'stock_id',
|
||||
'ecmproductstockindex_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',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
76
modules/EcmInventorys/metadata/studio.php
Executable file
76
modules/EcmInventorys/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',
|
||||
),
|
||||
|
||||
);
|
||||
121
modules/EcmInventorys/metadata/subpaneldefs.php
Executable file
121
modules/EcmInventorys/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?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['EcmQuotes']['subpanel_setup'] = array (
|
||||
|
||||
'notes' => array(
|
||||
'order' => 10,
|
||||
'module' => 'Notes',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_entered',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'notes',
|
||||
'add_subpanel_data' => 'note_id',
|
||||
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
/*
|
||||
'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/EcmInventorys/metadata/subpanels/ForProduct.php
Executable file
125
modules/EcmInventorys/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/EcmInventorys/metadata/subpanels/default.php
Executable file
124
modules/EcmInventorys/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%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
445
modules/EcmInventorys/vardefs.php
Executable file
445
modules/EcmInventorys/vardefs.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.
|
||||
* ******************************************************************************
|
||||
*/
|
||||
$dictionary ['EcmInventory'] = array (
|
||||
'table' => "ecminventorys",
|
||||
'comment' => 'EcmInventorys',
|
||||
'duplicate_merge' => true,
|
||||
'unified_search' => true,
|
||||
// FIELDS SECTION
|
||||
'fields' => array (
|
||||
// STANDARD FIELDS SECTION
|
||||
'id' => array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'name',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => true,
|
||||
'comment' => 'The short description of the record contents',
|
||||
'massupdate' => true,
|
||||
'merge_filter' => 'selected'
|
||||
),
|
||||
'status' => array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => false,
|
||||
'comment' => 'Status remanentu. informacja o tym czy dany remanent zostal juz wprowadzony, jak nie to jest mozliwosc edycji',
|
||||
'options' => 'ecminventorys_status_list',
|
||||
'massupdate' => false,
|
||||
'default' => 'in_create',
|
||||
),
|
||||
'ecmstockdoccorrects_id_minus' => array (
|
||||
'name' => 'ecmstockdoccorrects_id_minus',
|
||||
'vname' => 'LBL_ECMSTOCKDOCCORRECTS_ID_MINUS',
|
||||
'type' => 'varchar',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => false,
|
||||
'comment' => 'Id korekty stanu minus',
|
||||
'massupdate' => false,
|
||||
'default' => '',
|
||||
),
|
||||
'ecmstockdoccorrects_name_minus' => array (
|
||||
'name' => 'ecmstockdoccorrects_name_minus',
|
||||
'vname' => 'ecmstockdoccorrects_name_minus',
|
||||
'type' => 'varchar',
|
||||
'required' => false,
|
||||
'source' => 'non-db',
|
||||
'unified_search' => false,
|
||||
'massupdate' => false,
|
||||
),
|
||||
'ecmstockdoccorrects_id_plus' => array (
|
||||
'name' => 'ecmstockdoccorrects_id_plus',
|
||||
'vname' => 'LBL_ECMSTOCKDOCCORRECTS_ID_PLUS',
|
||||
'type' => 'varchar',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => false,
|
||||
'comment' => 'Id korekty stanu plus',
|
||||
'massupdate' => false,
|
||||
'default' => '',
|
||||
),
|
||||
'ecmstockdoccorrects_name_plus' => array (
|
||||
'name' => 'ecmstockdoccorrects_name_plus',
|
||||
'vname' => 'ecmstockdoccorrects_name_plus',
|
||||
'type' => 'varchar',
|
||||
'required' => false,
|
||||
'source' => 'non-db',
|
||||
'unified_search' => false,
|
||||
'massupdate' => false,
|
||||
),
|
||||
'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'
|
||||
),
|
||||
'canceled' => array(
|
||||
'name' => 'canceled',
|
||||
'vname' => 'LBL_DELETED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
'modified_user_id' => array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'required' => true,
|
||||
'reportable' => true,
|
||||
'comment' => 'User who last modified record'
|
||||
),
|
||||
'assigned_user_id' => array (
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_TO_ID',
|
||||
'group' => 'assigned_user_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'users',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'comment' => 'User ID assigned to record',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'created_by' => array (
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'created_by_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'comment' => 'User that created the record'
|
||||
),
|
||||
'created_by_link' => array (
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecminventorys' . '_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' => 'ecminventorys' . '_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'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
|
||||
),
|
||||
'ecmproduct_id' =>
|
||||
array (
|
||||
'name' => 'ecmproduct_id',
|
||||
'vname' => 'produkt',
|
||||
'type' => 'varchar',
|
||||
'len' => '244',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'ecmproductstockindex_id' => array (
|
||||
'name' => 'ecmproductstockindex_id',
|
||||
'type' => 'id',
|
||||
'module' => 'EcmProductStockIndexs',
|
||||
'vname' => 'LBL_ECMPRODUCTSTOCKINDEX',
|
||||
'group' => 'ecmproductstockindex_name',
|
||||
'massupdate' => false,
|
||||
'reportable' => false,
|
||||
'required' => false
|
||||
),
|
||||
'assigned_user_link' => array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecminventorys' . '_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' => false,
|
||||
'unified_search' => true,
|
||||
'required' => false,
|
||||
'len' => '20'
|
||||
),
|
||||
'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',
|
||||
'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
|
||||
|
||||
'notes' => array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecminventorys_notes',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES'
|
||||
),
|
||||
),
|
||||
// INDICES SECTION
|
||||
'indices' => array (
|
||||
array (
|
||||
'name' => 'ecminventorys' . 'pk',
|
||||
'type' => 'primary',
|
||||
'fields' => array (
|
||||
'id'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'idx_' . 'ecminventorys' . '_document_no',
|
||||
'type' => 'index',
|
||||
'fields' => array (
|
||||
'document_no'
|
||||
)
|
||||
) ,
|
||||
),
|
||||
// RELATIONSHIPS SECTION
|
||||
'relationships' => array (
|
||||
'ecminventorys' . '_assigned_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmInventorys',
|
||||
'rhs_table' => 'ecminventorys',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecminventorys' . '_modified_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmInventorys',
|
||||
'rhs_table' => 'ecminventorys',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecminventorys' . '_created_by' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmInventorys',
|
||||
'rhs_table' => 'ecminventorys',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecminventorys_notes' => array (
|
||||
'lhs_module' => 'EcmInventorys',
|
||||
'lhs_table' => 'ecminventorys',
|
||||
'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' => 'EcmInventorys'
|
||||
),
|
||||
),
|
||||
// THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
|
||||
'optimistic_locking' => true
|
||||
);
|
||||
95
modules/EcmInventorys/views/DetailView/view.detail.my.php
Executable file
95
modules/EcmInventorys/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/EcmInventorys/views/EditView/view.edit.ecminventorys.php
Executable file
184
modules/EcmInventorys/views/EditView/view.edit.ecminventorys.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 ViewEditEcmInventorys 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 ViewEditEcmInventorys(){
|
||||
|
||||
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/EcmInventorys/views/view.list.php
Executable file
252
modules/EcmInventorys/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 EcmInventorysViewList extends ViewList{
|
||||
|
||||
function EcmInventorysViewList(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->module=$module = "EcmInventorys";
|
||||
$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