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');
|
||||
?>
|
||||
61
modules/EcmStockDocOuts/Dashlets/MyEcmOfferesDashlet/MyEcmOfferesDashlet.php
Executable file
61
modules/EcmStockDocOuts/Dashlets/MyEcmOfferesDashlet/MyEcmOfferesDashlet.php
Executable file
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
85
modules/EcmStockDocOuts/DetailView.php
Executable file
85
modules/EcmStockDocOuts/DetailView.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
|
||||
// require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once ('modules/EcmStockDocOuts/EcmStockDocOut.php');
|
||||
require_once ('include/time.php');
|
||||
require_once ('include/json_config.php');
|
||||
echo '<script type="text/javascript"
|
||||
src="include/ECM/SearchProductTable.js"></script>';
|
||||
$json_config = new json_config ();
|
||||
|
||||
$focus = new EcmStockDocOut ();
|
||||
|
||||
if (isset ( $_REQUEST ['record'] )) {
|
||||
$focus->retrieve ( $_REQUEST ['record'] );
|
||||
$focus->format_all_fields ();
|
||||
$OPT ['status'] = $focus->status;
|
||||
}
|
||||
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
require_once ('modules/EcmStockDocOuts/views/DetailView/view.detail.my.php');
|
||||
$edit = new ViewDetailMy ();
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
$edit->module = 'EcmStockDocOuts';
|
||||
|
||||
// add pdf buttons
|
||||
//$btn = '<input title="Generuj PDF" class="button" onclick="if($(\'#div_pdf\').css(\'display\') == \'none\'){$(\'#div_pdf\').show(\'slow\'); } else { $(\'#div_pdf\').hide(\'slow\'); }" type="button" name="productcard" id="productcard" value="Generuj PDF">';
|
||||
//$btn .= '<div id="div_pdf" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
//$btn .= 'Typ: <select name="pdf_type" id="pdf_type"><option value="1">Dokument</option><option value="0">Operacje magazynowe</option></select><br /><br />';
|
||||
$btn .= '<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.open(\'index.php?module=EcmStockDocOuts&action=createPDF&to_pdf=1&pdf_type=\'+$(\'#pdf_type\').val()+\'&record=' . $_REQUEST ['record'] . '\',\'_blank\');" type="button" value="Pokaż PDF"></div>';
|
||||
$edit->ss->assign ( "CREATE_PDF", $btn );
|
||||
$btn2 .= '<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.open(\'index.php?module=EcmStockDocOuts&action=createPDF2&to_pdf=1&pdf_type=\'+$(\'#pdf_type\').val()+\'&record=' . $_REQUEST ['record'] . '\',\'_blank\');" type="button" value="Pokaż PDF dla klienta"></div>';
|
||||
$edit->ss->assign ( "CREATE_PDF2", $btn2 );
|
||||
$can_edit = false;
|
||||
global $current_user;
|
||||
$db = $GLOBALS['db'];
|
||||
$inv_button=true;
|
||||
$out = $db->query("SELECT * FROM ecminvoiceouts WHERE wz_id like '%".$focus->id."%'");
|
||||
if($out->num_rows>0){
|
||||
$inv_button=false;
|
||||
}
|
||||
//get operations
|
||||
|
||||
$out = $db->fetchByAssoc($db->query("SELECT sum(price*quantity) as sum FROM ecmstockoperations WHERE type='1' AND parent_id='".$focus->id."'"));
|
||||
$edit->ss->assign("OP_OUT", format_number($out['sum']));
|
||||
$in = $db->fetchByAssoc($db->query("SELECT sum(price*quantity) as sum FROM ecmstockoperations WHERE type='0' AND parent_id='".$focus->id."'"));
|
||||
$edit->ss->assign("OP_IN", format_number($in['sum']));
|
||||
$in = $db->fetchByAssoc($db->query("SELECT sum(quantity) as sum FROM ecmstockdocoutitems WHERE ecmstockdocout_id='".$focus->id."'"));
|
||||
$edit->ss->assign("quantity", $in['sum']);
|
||||
$edit->ss->assign ( "CREATED_BY_NAME", $focus->created_by_name );
|
||||
$edit->ss->assign ( "MODIFIED_BY_NAME", $focus->modified_by_name );
|
||||
$edit->ss->assign ( "inv_button", $inv_button );
|
||||
|
||||
$a = new EcmSale();
|
||||
$a->retrieve($focus->so_id);
|
||||
|
||||
$the_array ['ZS'] = "<a target='_blank' href='index.php?module=EcmSales&action=DetailView&record=$a->id'>".$a->document_no."</a>";
|
||||
$edit->ss->assign ( "zs_no", $the_array ['ZS'] );
|
||||
|
||||
$out = $focus->db->query("SELECT document_no,id FROM ecminvoiceouts WHERE wz_id like '%".$focus->id."%' and deleted=0 and canceled=0");
|
||||
$dane=$focus->db->fetchByAssoc($out);
|
||||
$the_array ['INVOICE_DOC'] = '<a href="index.php?module=EcmInvoiceOuts&action=DetailView&record=' . $dane['id'] . '">' . $dane['document_no'] . '</a>';
|
||||
|
||||
$edit->ss->assign ( "fk_no", $the_array ['INVOICE_DOC'] );
|
||||
|
||||
$a = new Account();
|
||||
$a->retrieve($focus->parent_id);
|
||||
$edit->ss->assign ( "EDI", $a->parent_id == '1249' ? true : false );
|
||||
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl';
|
||||
|
||||
$edit->preDisplay ();
|
||||
echo $edit->display ();
|
||||
|
||||
require_once ('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles ( $focus, 'EcmStockDocOuts' );
|
||||
echo $subpanel->display ();
|
||||
// loading view
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmStockDocOuts/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
?>
|
||||
1022
modules/EcmStockDocOuts/EcmStockDocOut.php
Executable file
1022
modules/EcmStockDocOuts/EcmStockDocOut.php
Executable file
File diff suppressed because it is too large
Load Diff
198
modules/EcmStockDocOuts/EditView.php
Executable file
198
modules/EcmStockDocOuts/EditView.php
Executable file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
//ini_set('display_errors',1);
|
||||
|
||||
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/EcmStockDocOuts/EcmStockDocOut.php');
|
||||
require_once ('include/time.php');
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
//add jquery
|
||||
echo '<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.css"/>';
|
||||
echo '<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/jQuery/jquery-2.1.0.min.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/jQuery/jquery-ui/ui/jquery-ui.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="modules/EcmStockDocOuts/javascript/searchcolumndefs.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/ECM/SearchProductTable.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/ECM/tablenavigator.js"></script>';
|
||||
// $cq=$current_user->getPreference('confirm_quotes');
|
||||
|
||||
$new_number = false;
|
||||
$duplicate = false;
|
||||
$focus = new EcmStockDocOut ();
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
require_once ('modules/EcmStockDocOuts/views/EditView/view.edit.ecmstockdocouts.php');
|
||||
$edit = new ViewEditEcmStockDocOuts ();
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
$edit->module = 'EcmStockDocOuts';
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
$edit->preDisplay ();
|
||||
|
||||
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 if ($_REQUEST['parent_doc_type']!="true" && $_REQUEST['parent_doc_id']!="") {
|
||||
$new_number=true;
|
||||
$ecmsale=true;
|
||||
$s= New EcmSale();
|
||||
$s->retrieve($_REQUEST['parent_doc_id']);
|
||||
$focus->parent_name=$s->parent_name;
|
||||
$focus->parent_id=$s->parent_id;
|
||||
$focus->shipping_address_name=$s->shipping_address_name;
|
||||
$focus->shipping_address_street=$s->shipping_address_street;
|
||||
$focus->shipping_address_postalcode=$s->shipping_address_postalcode;
|
||||
$focus->shipping_address_city=$s->shipping_address_city;
|
||||
$focus->shipping_address_country=$s->shipping_address_country;
|
||||
$focus->parent_iln=$s->parent_iln;
|
||||
$focus->order_no=$s->parent_document_no;
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->delivery_date = $s->delivery_date;
|
||||
$focus->stock_id=$s->stock_id || '754a59d6-979f-7006-a202-57c96a3eb06b';;
|
||||
$focus->so_id=$_REQUEST['parent_doc_id'];
|
||||
|
||||
if ($s->order_source == 'allegro') {
|
||||
$focus->stock_id = 'cf16804e-f698-5e09-2da3-6553588446ae';
|
||||
}
|
||||
|
||||
//get data
|
||||
|
||||
} else if (isset($_REQUEST['ecommerceWZ'])) {
|
||||
$new_number=true;
|
||||
$focus->stock_id = 'cf16804e-f698-5e09-2da3-6553588446ae';
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->parent_id = 'b5612f7f-85e5-f930-293e-62cead14b424';
|
||||
$db = $GLOBALS['db'];
|
||||
$invoiceIds = $_SESSION[$_REQUEST['ecommerceWZ']];
|
||||
$i = $db->fetchByAssoc($db->query("SELECT register_date FROM ecommerce_invoices WHERE id = '$invoiceIds[0]'"));
|
||||
$focus->delivery_date = date('d.m.Y', strtotime($i['register_date']));
|
||||
|
||||
$query = "
|
||||
SELECT ip.ecmproduct_id, SUM(ip.quantity) AS quantity, ip.price_netto, p.code, p.name, p.unit_id
|
||||
FROM ecommerce_invoices_products AS ip
|
||||
INNER JOIN ecmproducts AS p ON ip.ecmproduct_id = p.id
|
||||
WHERE invoice_id IN ('".implode('\',\'', $invoiceIds)."')
|
||||
AND ip.ecmproduct_id NOT IN ('', '165f364e-9301-25ac-5906-58e38f1de4ca')
|
||||
GROUP BY ip.ecmproduct_id, ip.price_netto;
|
||||
";
|
||||
$res = $db->query($query);
|
||||
$products = array();
|
||||
$position = 1;
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$products[] = array(
|
||||
'position' => $position++,
|
||||
'product_id' => $row['ecmproduct_id'],
|
||||
'product_code' => $row['code'],
|
||||
'name' => $row['name'],
|
||||
'quantity' => $row['quantity'],
|
||||
'price_netto' => $row['price_netto'],
|
||||
'unit_id' => $row['unit_id'],
|
||||
'unit_name' => $app_list_strings['ecmproducts_unit_dom'][$row['unit_id']],
|
||||
'ecmvat_name' => '23%',
|
||||
'ecmvat_value' => 23,
|
||||
'ecmvat_id' => '28079566-b825-e38f-9993-4ccc7b781de5',
|
||||
);
|
||||
}
|
||||
$edit->ss->assign('ECOMMERCE_PRODUCTS', json_encode($products));
|
||||
$edit->ss->assign('ECOMMERCE_INVOICES', json_encode($invoiceIds));
|
||||
$focus->ecommerce_invoices = $invoiceIds;
|
||||
|
||||
$query = "SELECT document_no FROM ecommerce_invoices WHERE id IN ('".implode('\',\'', $invoiceIds)."')";
|
||||
$res = $db->query($query);
|
||||
$documentNos = array();
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$documentNos[] = $row['document_no'];
|
||||
}
|
||||
$focus->pdf_text = "Dotyczy faktur: ".implode(', ', $documentNos);
|
||||
} else if (isset($_REQUEST['amazonWZ'])) {
|
||||
$new_number=true;
|
||||
$focus->stock_id = 'add8ef6f-3d1f-5ccf-c486-64719142f096';
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->parent_id = '63cb11a5-5304-086e-bf87-651c216d5641';
|
||||
$focus->currency_id = '6336d9a0-ee5f-52e3-7d0c-4e6f1472b2bf';
|
||||
$db = $GLOBALS['db'];
|
||||
$products = $_SESSION[$_REQUEST['amazonWZ']];
|
||||
$edit->ss->assign('ECOMMERCE_PRODUCTS', json_encode($products));
|
||||
|
||||
} else if (isset($_REQUEST['fromPZ'])) {
|
||||
$new_number=true;
|
||||
$pz = new EcmStockDocIn();
|
||||
$pz->retrieve($_REQUEST['fromPZ']);
|
||||
$focus->parent_name=$pz->parent_name;
|
||||
$focus->parent_id=$pz->parent_id;
|
||||
$focus->stock_id=$pz->stock_id;
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->delivery_date = date("d.m.Y");
|
||||
$focus->pdf_text = "Dotyczy PZ: ".$pz->document_no;
|
||||
$pzPositions = $pz->getPositionList(true);
|
||||
$products = array();
|
||||
foreach ($pzPositions as $position) {
|
||||
$products[] = array(
|
||||
'position' => $position['position'],
|
||||
'product_id' => $position['product_id'],
|
||||
'product_code' => $position['product_code'],
|
||||
'name' => $position['name'],
|
||||
'quantity' => $position['quantity'],
|
||||
'price_netto' => $position['price'],
|
||||
'unit_id' => $position['unit_id'],
|
||||
'unit_name' => $position['unit_name'],
|
||||
'ecmvat_name' => $position['ecmvat_name'],
|
||||
'ecmvat_value' => $position['ecmvat_value'],
|
||||
'ecmvat_id' => $position['ecmvat_id'],
|
||||
);
|
||||
}
|
||||
$edit->ss->assign('ECOMMERCE_PRODUCTS', json_encode($products));
|
||||
} else {
|
||||
$new_number=true;
|
||||
//dates
|
||||
$focus->stock_id=$current_user->stock_id;
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->stock_id=$current_user->stock_id;
|
||||
$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.'"/>';
|
||||
//includ OO VAT
|
||||
$v = new EcmVat();
|
||||
$v->retrieve('a8c52d5e-15df-2a13-c934-5578307bebd2');
|
||||
$oo = array ('id' => 'a8c52d5e-15df-2a13-c934-5578307bebd2', 'name' => strtoupper($v->name), 'value' =>strtoupper($v->value));
|
||||
echo '<script> var OO=\''.json_encode($oo).'\'</script>';
|
||||
|
||||
|
||||
$edit->ss->assign ("NEW_NUMBER", $new_number );
|
||||
$edit->ss->assign("DUPLICATE", $duplicate);
|
||||
$edit->ss->assign("ECMSALE", $ecmsale);
|
||||
$edit->ss->assign("ECMSALE_ID",$_REQUEST['parent_doc_id']);
|
||||
$edit->ss->assign("STOCK", $stock);
|
||||
|
||||
echo $edit->display ();
|
||||
//loading view
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmStockDocOuts/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
106
modules/EcmStockDocOuts/Menu.php
Executable file
106
modules/EcmStockDocOuts/Menu.php
Executable file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $current_user;
|
||||
|
||||
$module_menu [] = Array("index.php?module=".'EcmStockDocOuts'."&action=EditView&return_module=".'EcmStockDocOuts'."&return_action=DetailView", translate('LNK_NEW_'.'ECMSTOCKDOCOUT', 'EcmStockDocOuts'),"CreateEcmStockDocOuts", 'EcmStockDocOuts');
|
||||
|
||||
$module_menu [] = Array("index.php?module=EcmStockDocOuts&action=index&return_module=EcmStockDocOuts&return_action=DetailView", translate('LNK_ECMSTOCKDOCOUTS_LIST','EcmStockDocOuts'),"EcmStockDocOuts", 'EcmStockDocOuts');
|
||||
|
||||
|
||||
|
||||
303
modules/EcmStockDocOuts/PDFTemplate/content.php
Executable file
303
modules/EcmStockDocOuts/PDFTemplate/content.php
Executable file
@@ -0,0 +1,303 @@
|
||||
<?php
|
||||
$w = "40"; // first column width
|
||||
$w2 = "30"; // second column width
|
||||
$w3= "20";
|
||||
global $app_list_strings;
|
||||
|
||||
$content ='<p style="text-align: center;"><b>'.$labels['LBL_PDF_DOCUMENT_NO'].' '.$focus->document_no.'</b></p>
|
||||
<table style="width: 100%; font-size: 8pt;">
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
<b>'.$labels['LBL_PDF_CONTENT_INVOICE_FOR'].'</b>
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">';
|
||||
if($focus->shipping_address_name!=''){
|
||||
$content.= '<b>DOSTAWA DO</b>';
|
||||
}
|
||||
$content.= '</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
' . $focus->parent_name . '
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
'.$focus->shipping_address_name.'
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
' . $focus->parent_address_street . '
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
' . $focus->shipping_address_street . '
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%"></td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
'. $focus->parent_address_postalcode . ' ' . $focus->parent_address_city;
|
||||
if (!is_null($focus->parent_address_country) & $focus->parent_address_country!='')
|
||||
$content.=', '.$focus->parent_address_country;
|
||||
$content.='
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
'. $focus->shipping_address_postalcode . ' ' . $focus->shipping_address_city;
|
||||
if (!is_null($focus->shipping_address_country) & $focus->shipping_address_country!='')
|
||||
$content.=', '.$focus->shipping_address_country;
|
||||
$content.='
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>';
|
||||
$content.='
|
||||
<tr>
|
||||
<td valign="top" style="width: ' . $w . '%">';
|
||||
if (!is_null($focus->parent_nip) && $focus->parent_nip) {
|
||||
$content.=$labels['LBL_PDF_CONTENT_NIP'].' '.$focus->parent_nip;
|
||||
$nip = true;
|
||||
}
|
||||
if (!is_null($focus->parent_iln) && $focus->parent_iln) {
|
||||
if ($nip) $content.'<br>'; $nip = false;
|
||||
$content.='<br>ILN: '.$focus->parent_iln;
|
||||
}
|
||||
$content.='
|
||||
</td>';
|
||||
$content.='
|
||||
<td valign="top" style="width: ' . $w3 . '%">';
|
||||
if (!is_null($focus->shipping_nip) && $focus->shipping_nip) {
|
||||
$content.=$labels['LBL_PDF_CONTENT_NIP'].' '.$focus->parent_shipping_nip;
|
||||
$nip = true;
|
||||
}
|
||||
if (!is_null($focus->shipping_iln) && $focus->shipping_iln) {
|
||||
if ($nip) $content.'<br>'; $nip = false;
|
||||
$content.='ILN: '.$focus->shipping_iln;
|
||||
}
|
||||
$content.='
|
||||
</td>
|
||||
<td valign="top" style="width: ' . $w2 . '%"></td>
|
||||
<td colspan="0" valign="top" style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>';
|
||||
$content.='
|
||||
</table><br>
|
||||
';
|
||||
if ($focus->name && $focus->name != '') {
|
||||
$content .= '
|
||||
<table style="width: 100%; text-align: center">
|
||||
<tr><td>
|
||||
<b>' . $focus->name . '</b>
|
||||
</td></tr>
|
||||
</table>
|
||||
';
|
||||
}
|
||||
|
||||
$content .= '<br><table width="100%" style="font-size: 7pt;text-align:right;vertical-align:top;">
|
||||
<tr><td width="44%" style="text-align: left">'.$labels['LBL_PDF_CONTENT_REGISTER_DATE'].' <b>' . $focus->register_date . ' </b>'.($focus->delivery_date!="" ? '<br>Data dostawy: <b>'.$focus->delivery_date.'</b>': '').''.($focus->ads_text!="" ? '<br>Kod dostawcy: <b>'.$focus->ads_text.'</b>': '');
|
||||
|
||||
if ($focus->parent_id == '226a168c-2fef-b92f-0918-6200de91bb31') {
|
||||
$content .= '<br>Numer dostawcy: <b>12342</b>';
|
||||
$content .= '<br>GLN dostawcy: <b>5909000896239</b><br>';
|
||||
}
|
||||
|
||||
$content .= '</td><td style="text-align: left;" width="20%"><br></td><td rowspan="2" style="text-align: left;vertical-align:top;">';
|
||||
|
||||
if($focus->wz_name!=''){
|
||||
$content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_WZ'].':<br>';
|
||||
}
|
||||
if($focus->order_no!=''){
|
||||
$content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_NO'].'<br>';
|
||||
}
|
||||
if($focus->category!=''){
|
||||
$content .= 'Kategoria:<br>';
|
||||
}
|
||||
$content.=$labels['LBL_STOCK_NAME'].':<br>';
|
||||
$content.='</td>
|
||||
<td rowspan="2" style="vertical-align:top;">';
|
||||
if($focus->wz_name!=''){
|
||||
$content.='<b>' . $focus->wz_name.'</b><br>';
|
||||
}
|
||||
if($focus->order_no!=''){
|
||||
$content.='<b>' . $focus->order_no.'</b><br>';
|
||||
}
|
||||
if($focus->category!=''){
|
||||
$content.='<b>' . $app_list_strings['ecmstockdocouts_category_list'][$focus->category] .'</b><br>';
|
||||
}
|
||||
$content.='<b>' . $focus->stock_name.'</b><br>';
|
||||
$content.='</td></tr></table>';
|
||||
|
||||
$content .= '<br>';
|
||||
|
||||
// start items table
|
||||
$columns = array ();
|
||||
$EcmSysInfo = new EcmSysInfo();
|
||||
$columns ['position'] = array (
|
||||
'field' => array (
|
||||
'position'
|
||||
),
|
||||
'label' => 'Lp.',
|
||||
'align' => 'center'
|
||||
);
|
||||
|
||||
$columns ['name'] = array (
|
||||
'field' => array (
|
||||
'name',
|
||||
'product_code'
|
||||
),
|
||||
'label' => 'Nazwa<br>Indeks',
|
||||
'align' => 'left'
|
||||
);
|
||||
if($EcmSysInfo->getDatabaseName()=='preDb_0dcc87940d3655fa574b253df04ca1c3'){
|
||||
$columns ['recipient_code'] = array (
|
||||
'field' => array (
|
||||
'recipient_code',
|
||||
),
|
||||
'label' => 'Kod odbiorcy',
|
||||
'align' => 'left'
|
||||
);
|
||||
}
|
||||
$columns ['qty'] = array (
|
||||
'field' => array (
|
||||
'quantity',
|
||||
'unit_name'
|
||||
),
|
||||
'label' => 'Ilość<br>J.m.',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
if ($focus->parent_id == '226a168c-2fef-b92f-0918-6200de91bb31') {
|
||||
$columns ['logistic_1'] = array (
|
||||
'field' => array (
|
||||
'product_pieces_per_carton',
|
||||
),
|
||||
'label' => 'PCB',
|
||||
'align' => 'right'
|
||||
);
|
||||
$columns ['logistic_2'] = array (
|
||||
'field' => array (
|
||||
'product_cartons'
|
||||
),
|
||||
'label' => 'Ilość kartonów',
|
||||
'align' => 'right'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// set widths
|
||||
$totals = array ();
|
||||
|
||||
$columns ['position'] ['width'] = '5';
|
||||
$columns ['name'] ['width'] = '55';
|
||||
if($EcmSysInfo->getDatabaseName()=='preDb_0dcc87940d3655fa574b253df04ca1c3'){
|
||||
|
||||
$columns ['recipient_code'] ['width'] = '10';
|
||||
}
|
||||
$columns ['qty'] ['width'] = '10';
|
||||
|
||||
|
||||
// rysujemy :)
|
||||
$content .= '
|
||||
<table style="width: 100%; font-size: 7pt; border: 0.5 solid black; border-collapse: collapse"><thead>
|
||||
<tr>
|
||||
';
|
||||
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '
|
||||
<th style="border: 0.5 solid black; width: ' . $col ['width'] . '%;background-color: #E6E6FA;">' . $col ['label'] . '</th>
|
||||
';
|
||||
}
|
||||
$content .= '
|
||||
</tr></thead><tbody>
|
||||
';
|
||||
$total_qty=0;
|
||||
foreach ( $positions as $pos ) {
|
||||
if ($pos['part_no'] && $pos['part_no']!='.')
|
||||
$pos['product_code'].= '<br>'.$pos['part_no'];
|
||||
$content .= '<tr>';
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '<td style="border: 0.5 solid black; text-align: ' . $col ['align'] . ';">';
|
||||
foreach ( $col ['field'] as $f ) {
|
||||
if (! $pos [$f] || $pos [$f] == '')
|
||||
$pos [$f] = '-';
|
||||
|
||||
$content .= $pos [$f] . '<br>';
|
||||
}
|
||||
$content .= '</td>';
|
||||
}
|
||||
$content .= '</tr>';
|
||||
$total_qty+=$pos['quantity'];
|
||||
}
|
||||
|
||||
$content .= '
|
||||
</tbody></table>
|
||||
';
|
||||
// summary table
|
||||
// get currency symbol
|
||||
$c = new Currency ();
|
||||
$c->retrieve ( $focus->currency_id );
|
||||
$symbol = $c->symbol;
|
||||
unset ( $c );
|
||||
$content .= '
|
||||
<br><br>
|
||||
<table style="font-size: 7pt; border: 0.5 solid black; border-collapse: collapse; width: 215px; margin-left: 70%">
|
||||
';
|
||||
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="border: 0.5 solid black; width: 50%;background-color: #E6E6FA;">
|
||||
<b>Razem ilość:</b>
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
' .$total_qty . '
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
if ($focus->parent_id == '226a168c-2fef-b92f-0918-6200de91bb31') {
|
||||
$total_cartoons = 0;
|
||||
foreach ( $positions as $pos ) {
|
||||
$total_cartoons += $pos['product_cartons'];
|
||||
}
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="border: 0.5 solid black; width: 50%;background-color: #E6E6FA;">
|
||||
<b>Ilość kartonów:</b>
|
||||
</td>
|
||||
<td style="border: 0.5 solid black; text-align: right;">
|
||||
' .$total_cartoons. '
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
$content .= '
|
||||
</table>
|
||||
<br><p style="font-size: 7pt;">'.$labels['LBL_PDF_CONTENT_ISSUED_BY'].' <b>'.$user->full_name.'</b></p>
|
||||
' . $focus->pdf_text . '
|
||||
';
|
||||
|
||||
//echo $content; die();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
331
modules/EcmStockDocOuts/PDFTemplate/content2.php
Executable file
331
modules/EcmStockDocOuts/PDFTemplate/content2.php
Executable file
@@ -0,0 +1,331 @@
|
||||
<?php
|
||||
$w = "30"; // first column width
|
||||
$w3 = "30";
|
||||
$w2 = "20"; // second column width
|
||||
$content = '<p style="text-align: center;"><b>WZ nr '.$focus->document_no.'</b></p>
|
||||
<table style="width: 100%; font-size: 8pt;">
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
<b>'.$labels['LBL_PDF_CONTENT_INVOICE_FOR'].'</b>
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">';
|
||||
if($focus->shipping_address_name!=''){
|
||||
$content.= '<b>'.$labels['LBL_PDF_CONTENT_DELIVERY'].'</b>';
|
||||
}
|
||||
$content.= '</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
' . $focus->parent_name . '
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
'.$focus->shipping_address_name.'
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
' . $focus->parent_address_street . '
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
' . $focus->shipping_address_street . '
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%"></td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
'. $focus->parent_address_postalcode . ' ' . $focus->parent_address_city;
|
||||
if (!is_null($focus->parent_address_country) & $focus->parent_address_country!='')
|
||||
$content.=', '.$focus->parent_address_country;
|
||||
$content.='
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
'. $focus->shipping_address_postalcode . ' ' . $focus->shipping_address_city;
|
||||
if (!is_null($focus->shipping_address_country) & $focus->shipping_address_country!='')
|
||||
$content.=', '.$focus->shipping_address_country;
|
||||
$content.='
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>';
|
||||
$content.='
|
||||
<tr>
|
||||
<td valign="top" style="width: ' . $w . '%">';
|
||||
if (!is_null($focus->parent_nip) && $focus->parent_nip) {
|
||||
$content.=$labels['LBL_PDF_CONTENT_NIP'].' '.$focus->parent_nip;
|
||||
$nip = true;
|
||||
}
|
||||
if (!is_null($focus->parent_iln) && $focus->parent_iln) {
|
||||
if ($nip) $content.'<br>ILN:'; $nip = false;
|
||||
$content.='<br>ILN: '.$focus->parent_iln;
|
||||
}
|
||||
$content.='
|
||||
</td>';
|
||||
$content.='
|
||||
<td valign="top" style="width: ' . $w3 . '%">';
|
||||
if (!is_null($focus->shipping_nip) && $focus->shipping_nip) {
|
||||
$content.=$labels['LBL_PDF_CONTENT_NIP'].' '.$focus->shipping_nip;
|
||||
$nip = true;
|
||||
}
|
||||
if (!is_null($focus->shipping_iln) && $focus->shipping_iln) {
|
||||
if ($nip) $content.'<br>'; $nip = false;
|
||||
$content.=$labels['LBL_PDF_CONTENT_ILN'].' '.$focus->shipping_iln;
|
||||
}
|
||||
$content.='
|
||||
</td>
|
||||
<td valign="top" style="width: ' . $w2 . '%"></td>
|
||||
<td colspan="0" valign="top" style="text-align: right">
|
||||
</td>
|
||||
</tr>';
|
||||
$content.='
|
||||
</table><br>
|
||||
';
|
||||
if ($focus->name && $focus->name != '') {
|
||||
$content .= '
|
||||
<table style="width: 100%; text-align: center">
|
||||
<tr><td>
|
||||
<b>' . $focus->name . '</b>
|
||||
</td></tr>
|
||||
</table>
|
||||
';
|
||||
}
|
||||
$qtyOrder="";
|
||||
|
||||
if($focus->order_qty!=''){
|
||||
$qtyOrder="<br>Ilość paczek/palet: <b>".$focus->order_qty.'</b>';
|
||||
}
|
||||
$content .= '<br><table width="100%" style="font-size: 7pt;text-align:right;vertical-align:top;">
|
||||
<tr><td width="44%" style="text-align: left">'.$labels['LBL_PDF_CONTENT_REGISTER_DATE'].' <b>' . $focus->register_date . '</b>'.($focus->delivery_date!="" ? '<br>Data dostawy: <b>'.$focus->delivery_date.'</b>': '').$qtyOrder.'</td>
|
||||
<td style="text-align: left;" width="20%"><br></td>
|
||||
<td rowspan="2" style="text-align: right;vertical-align:top;">';
|
||||
if($focus->wz_name!=''){
|
||||
$content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_WZ'].':<br>';
|
||||
}
|
||||
if($focus->order_no!=''){
|
||||
$content.=$labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_NO'].'<br>';
|
||||
}
|
||||
if($focus->category!=''){
|
||||
$content .= 'Kategoria:<br>';
|
||||
}
|
||||
$content.=$labels['LBL_STOCK_NAME'].':<br>';
|
||||
$content.='</td>
|
||||
<td rowspan="2" style="vertical-align:top;">';
|
||||
if($focus->wz_name!=''){
|
||||
$content.='<b>' . $focus->wz_name.'</b><br>';
|
||||
}
|
||||
if($focus->order_no!=''){
|
||||
$content.='<b>' . $focus->order_no.'</b><br>';
|
||||
}
|
||||
if($focus->category!=''){
|
||||
$content.='<b>' . $app_list_strings['ecmstockdocouts_category_list'][$focus->category] .'</b><br>';
|
||||
}
|
||||
$content.='<b>' . $focus->stock_name.'</b><br>';
|
||||
$content.='</td></tr></table>';
|
||||
|
||||
$content .= '<br>';
|
||||
|
||||
// start items table
|
||||
$columns = array ();
|
||||
|
||||
$columns ['position'] = array (
|
||||
'field' => array (
|
||||
'position'
|
||||
),
|
||||
'label' => 'Lp.',
|
||||
'align' => 'center'
|
||||
);
|
||||
|
||||
$columns ['name'] = array (
|
||||
'field' => array (
|
||||
'name',
|
||||
'product_code'
|
||||
),
|
||||
'label' => 'Nazwa<br>Indeks',
|
||||
'align' => 'left'
|
||||
);
|
||||
$columns ['qty'] = array (
|
||||
'field' => array (
|
||||
'quantity',
|
||||
'unit_name'
|
||||
),
|
||||
'label' => 'Ilość<br>J.m.',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['price_netto'] = array (
|
||||
'field' => array (
|
||||
'price_netto'
|
||||
),
|
||||
'label' => 'Cena netto',
|
||||
'align' => 'right'
|
||||
);
|
||||
|
||||
$columns ['total_netto'] = array (
|
||||
'field' => array (
|
||||
'total_netto'
|
||||
),
|
||||
'label' => 'Wartość<br>netto',
|
||||
'align' => 'right'
|
||||
);
|
||||
$columns ['ecmvat_name'] = array (
|
||||
'field' => array (
|
||||
'ecmvat_name'
|
||||
),
|
||||
'label' => 'VAT<br>(%)',
|
||||
'align' => 'center'
|
||||
);
|
||||
$columns ['total_vat'] = array (
|
||||
'field' => array (
|
||||
'total_vat'
|
||||
),
|
||||
'label' => 'Wartość<br>VAT',
|
||||
'align' => 'right'
|
||||
);
|
||||
$columns ['total_brutto'] = array (
|
||||
'field' => array (
|
||||
'total_brutto'
|
||||
),
|
||||
'label' => 'Wartość<br>brutto',
|
||||
'align' => 'right'
|
||||
);
|
||||
// set widths
|
||||
$totals = array ();
|
||||
|
||||
$columns ['position'] ['width'] = '5';
|
||||
$columns ['name'] ['width'] = '41';
|
||||
$columns ['qty'] ['width'] = '10';
|
||||
$columns ['price_netto'] ['width'] = '10';
|
||||
$columns ['total_netto'] ['width'] = '10';
|
||||
$columns ['ecmvat_name'] ['width'] = '4';
|
||||
$columns ['total_vat'] ['width'] = '10';
|
||||
$columns ['total_brutto'] ['width'] = '10';
|
||||
|
||||
// rysujemy :)
|
||||
$content .= '
|
||||
<table style="width: 100%; font-size: 7pt; border: 0.5 solid black; border-collapse: collapse;"><thead>
|
||||
<tr>
|
||||
';
|
||||
|
||||
foreach ( $columns as $col ) {
|
||||
$content .= '
|
||||
<th style="border: 0.5 solid black; width: ' . $col ['width'] . '%;background-color: #E9E9E9;">' . $col ['label'] . '</th>
|
||||
';
|
||||
}
|
||||
$content .= '</tr></thead><tbody>';
|
||||
$counter=1;
|
||||
foreach ( $positions as $pos ) {
|
||||
$content .= '<tr>';
|
||||
foreach ( $columns as $col ) {
|
||||
|
||||
$content .= '<td style="border: 0.5 solid black; text-align: ' . $col ['align'] . ';">';
|
||||
foreach ( $col ['field'] as $f ) {
|
||||
|
||||
if (! $pos [$f] || $pos [$f] == '')
|
||||
$pos [$f] = '-';
|
||||
$content .= $pos [$f] . '<br>';
|
||||
|
||||
}
|
||||
$content .= '</td>';
|
||||
}
|
||||
$content .= '</tr>';
|
||||
}
|
||||
|
||||
$content .= '
|
||||
</tbody></table>
|
||||
';
|
||||
// summary table
|
||||
// get currency symbol
|
||||
$c = new Currency ();
|
||||
$c->retrieve ( $focus->currency_id );
|
||||
$symbol = $c->symbol;
|
||||
unset ( $c );
|
||||
$content .= '
|
||||
<br><br>
|
||||
<table style="font-size: 9pt; border: 0.5 solid black; border-collapse: collapse; width: 300px; margin-left: 60%">
|
||||
';
|
||||
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 23%;text-align: center;">
|
||||
<b>VAT (%)</b>
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: center;">
|
||||
<b>Wartość netto</b>
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: center;">
|
||||
<b>Wartość VAT</b>
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 27%;text-align: center;">
|
||||
<b>Wartość brutto</b>
|
||||
</td>';
|
||||
|
||||
$content.='</tr>
|
||||
';
|
||||
$vats = explode(",", $focus->vats_summary);
|
||||
foreach ($vats as $v){
|
||||
if($v=='')continue;
|
||||
$v2 = explode(":", $v);
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 23%;text-align: center;">
|
||||
'.$v2[0].'
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: right;">
|
||||
'.format_number($v2[1]).'
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: right;">
|
||||
'.format_number($v2[2]).'
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 27%;text-align: right;">
|
||||
'.format_number($v2[3]).'
|
||||
</td></tr>';
|
||||
}
|
||||
// totals
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 23%;text-align: center;background-color: #E9E9E9;">
|
||||
<b>Razem</b>
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: right;background-color: #E9E9E9;">
|
||||
<b>'.format_number($focus->total_netto).'</b>
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: right;background-color: #E9E9E9;">
|
||||
<b>'.format_number($focus->total_vat).'</b>
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 27%;text-align: right;background-color: #E9E9E9;">
|
||||
<b>'.format_number($focus->total_brutto).'</b>
|
||||
</td></tr>';
|
||||
|
||||
$content .= '
|
||||
</table>
|
||||
<br><p style="font-size: 7pt;">'.$labels['LBL_PDF_CONTENT_ISSUED_BY'].' <b>'.$user->full_name.'</b></p>
|
||||
' . $focus->pdf_text . '
|
||||
';
|
||||
|
||||
//echo $content; die();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
5
modules/EcmStockDocOuts/PDFTemplate/header.php
Executable file
5
modules/EcmStockDocOuts/PDFTemplate/header.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$db = $GLOBALS ['db'];
|
||||
$querySelect = 'SELECT text0 FROM operating_values WHERE id="14"';
|
||||
$rows = $db->fetchByAssoc($db->query($querySelect));
|
||||
$header = html_entity_decode($rows['text0']);
|
||||
35
modules/EcmStockDocOuts/PDFTemplate/helper.php
Executable file
35
modules/EcmStockDocOuts/PDFTemplate/helper.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
function formatPDFPositions22($positions, $focus) {
|
||||
$result = array();
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
|
||||
$pos['quantity'] = $pos['quantity'];
|
||||
$pos['price']=format_number($pos['price']);
|
||||
$pos['total']=format_number($pos['total']);
|
||||
|
||||
$pos['price_netto']=format_number($pos['price_netto']);
|
||||
$pos['total_netto']=format_number($pos['total_netto']);
|
||||
$pos['total_vat']=format_number($pos['total_vat']);
|
||||
$pos['total_brutto']=format_number($pos['total_brutto']);
|
||||
|
||||
$result[] = $pos;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getQuantity22($positions, $focus) {
|
||||
$result=0;
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
|
||||
|
||||
$result+=$pos['quantity'];
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
9
modules/EcmStockDocOuts/PDFTemplate/types.php
Executable file
9
modules/EcmStockDocOuts/PDFTemplate/types.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
global $pdf_types;
|
||||
$pdf_types = array(
|
||||
'0' => 'WZ (z cenami)',
|
||||
'1' => 'WZ (bez cen)',
|
||||
'lr' => 'Lista rozchodowo/przychodowa',
|
||||
);
|
||||
?>
|
||||
|
||||
149
modules/EcmStockDocOuts/Save.php
Executable file
149
modules/EcmStockDocOuts/Save.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
|
||||
/**
|
||||
* ***************************************************************************
|
||||
*
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
*
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
*
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
*
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
*
|
||||
* either express or implied.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You may:
|
||||
*
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
*
|
||||
* a royalty or other fee.
|
||||
*
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
*
|
||||
* publicly available and document your modifications clearly.
|
||||
*
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
*
|
||||
* obligations for your customers.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You may NOT:
|
||||
*
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
*
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
*
|
||||
* Provider).
|
||||
*
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
*
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
*
|
||||
* involves PHYSICAL media.
|
||||
*
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
*
|
||||
* or License text in the Licensed Software
|
||||
*
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
*
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
*
|
||||
* Licensed Software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You must:
|
||||
*
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
*
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
*
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
*
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
*
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
*
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
*
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
*
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
*
|
||||
* Olavo Farias
|
||||
*
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
*
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
*
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ******************************************************************************
|
||||
*/
|
||||
|
||||
$json = getJSONobj ();
|
||||
require_once ("modules/EcmStockDocOuts/EcmStockDocOut.php");
|
||||
require_once ('include/formbase.php');
|
||||
$focus = new EcmStockDocOut ();
|
||||
|
||||
if (isset ( $_POST ['record'] ) && $_POST ['record'] != '') {
|
||||
$focus->retrieve ( $_POST ['record'] );
|
||||
}
|
||||
|
||||
|
||||
$check_notify = FALSE;
|
||||
|
||||
foreach ( $focus->column_fields as $field ) {
|
||||
if (isset ( $_POST [$field] )) {
|
||||
$value = $_POST [$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $focus->additional_column_fields as $field ) {
|
||||
if (isset ( $_POST [$field] )) {
|
||||
$value = $_POST [$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$focus->position_list = $json->decode ( htmlspecialchars_decode ( $_POST ['position_list'] ) );
|
||||
|
||||
$focus->save ( $check_notify );
|
||||
|
||||
$return_id = $focus->id;
|
||||
|
||||
$focus->ecommerce_invoices = $json->decode ( htmlspecialchars_decode ( $_POST ['ecommerce_invoices'] ) );
|
||||
if (isset ( $focus->ecommerce_invoices ) && count ( $focus->ecommerce_invoices ) > 0) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$db->query ( "UPDATE ecommerce_invoices SET ecmstockdocout_id = '$return_id' WHERE id IN ('" . implode ( "','", $focus->ecommerce_invoices ) . "')" );
|
||||
}
|
||||
|
||||
echo $return_id;
|
||||
return;
|
||||
/*
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
window.open(window.open(\'index.php?module=EcmStockDocOuts&action=createPDF&to_pdf=1&pdf_type=\'+$(\'#pdf_type\').val()+\'&record=' . $return_id . '\',\'_blank\'););
|
||||
</script>
|
||||
';
|
||||
return;
|
||||
//handleRedirect ( $return_id, 'EcmStockDocOuts' );
|
||||
*/
|
||||
76
modules/EcmStockDocOuts/copy_old_quotes.php
Executable file
76
modules/EcmStockDocOuts/copy_old_quotes.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
$db = $GLOBALS['db'];
|
||||
global $app_list_strings;
|
||||
|
||||
$db->query("TRUNCATE TABLE ecmstockdocouts");
|
||||
|
||||
$res = $db->query("SELECT * FROM ecmstockdocoutscp ORDER BY register_date DESC");
|
||||
|
||||
while ($r = $db->fetchByAssoc($res)) {
|
||||
$q="INSERT INTO ecmstockdocouts VALUES (
|
||||
'".$r['id']."',
|
||||
'".$r['name']."',
|
||||
'".$r['description']."',
|
||||
'".$r['date_entered']."',
|
||||
'".$r['date_modified']."',
|
||||
'".$r['modified_user_id']."',
|
||||
'".$r['assigned_user_id']."',
|
||||
'".$r['created_by']."',
|
||||
'".$r['deleted']."',
|
||||
'".$r['number']."',
|
||||
'".$r['document_no']."',
|
||||
'".$r['register_date']."',
|
||||
'".$r['total']."',
|
||||
'',
|
||||
'".$r['stock_to_id']."',
|
||||
'".$r['stock_from_id']."'
|
||||
);
|
||||
";
|
||||
$db->query($q);
|
||||
|
||||
$all_total = 0;
|
||||
|
||||
//get products
|
||||
//remove old
|
||||
$db->query("DELETE FROM ecmstockdocoutitems WHERE ecmstockdocout_id='".$r['id']."'");
|
||||
|
||||
$pres = $db->query("SELECT * FROM ecmstockdomoveitemscp WHERE ecmstockdocout_id='".$r['id']."'");
|
||||
|
||||
while ($p = $db->fetchByAssoc($pres)) {
|
||||
//calculate totals
|
||||
$total = $p['price']*$p['quantity'];
|
||||
$all_total+=$total;
|
||||
|
||||
$unit_name = $app_list_strings['ecmproducts_unit_dom'][$p['dd_unit_id']];
|
||||
|
||||
$pq = "INSERT INTO ecmstockdocoutitems VALUES(
|
||||
'".$p['id']."',
|
||||
'".$p['date_entered']."',
|
||||
'".$p['date_modified']."',
|
||||
'".$p['modified_user_id']."',
|
||||
'".$p['assigned_user_id']."',
|
||||
'".$p['created_by']."',
|
||||
'".$p['deleted']."',
|
||||
'".$p['ecmstockdocout_id']."',
|
||||
'".$p['ecmproduct_id']."',
|
||||
'".$p['position']."',
|
||||
'".$p['code']."',
|
||||
'".$p['name']."',
|
||||
'".$p['quantity']."',
|
||||
'".$p['price']."',
|
||||
'$total',
|
||||
'".$p['dd_unit_id']."',
|
||||
'$unit_name',
|
||||
'".$p['ecmproductcategory_id']."'
|
||||
);";
|
||||
$db->query($pq);
|
||||
}
|
||||
|
||||
//update totals
|
||||
foreach ($vats as $k=>$v) {
|
||||
$vats_all = $k.':'.$v.',';
|
||||
}
|
||||
|
||||
$db->query("UPDATE ecmstockdocouts SET total='$all_total' WHERE id='".$r['id']."'");
|
||||
}
|
||||
echo 'koniec';
|
||||
3
modules/EcmStockDocOuts/createInvoice.php
Executable file
3
modules/EcmStockDocOuts/createInvoice.php
Executable file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
echo "lol";
|
||||
?>
|
||||
46
modules/EcmStockDocOuts/createPDF.php
Executable file
46
modules/EcmStockDocOuts/createPDF.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
if (!$_REQUEST ['record'] || $_REQUEST ['record'] == '') {
|
||||
die('Brak rekordu');
|
||||
} else {
|
||||
$record = $_REQUEST ['record'];
|
||||
}
|
||||
|
||||
include_once ("modules/EcmStockDocOuts/PDFTemplate/helper.php");
|
||||
|
||||
$focus = new EcmStockDocOut ();
|
||||
$focus->retrieve($record);
|
||||
|
||||
$user = new User ();
|
||||
$user->retrieve($focus->assigned_user_id);
|
||||
|
||||
include_once ("include/MPDF57/mpdf.php");
|
||||
$p = new mPDF('', 'A4', null, 'helvetica', 10, 10, 30, 45, 5, 5);
|
||||
$labels = return_module_language($focus->ecmlanguage, 'EcmStockDocOuts');
|
||||
$mpdf->mirrorMargins = 1;
|
||||
$db = $GLOBALS ['db'];
|
||||
$positions = formatPDFPositions22($focus->getPositionList(true), $focus);
|
||||
$quantity = getQuantity22($focus->getPositionList(true), $focus);
|
||||
$content = '';
|
||||
|
||||
if ($_REQUEST['pdf_type']=='lr') {
|
||||
include_once ("modules/EcmStockOperations/PdfTemplate/content.php");
|
||||
$content = getDocOperations('EcmStockDocOuts', $record);
|
||||
} else if ($_REQUEST['pdf_type']=='1') {
|
||||
include_once ("modules/EcmStockDocOuts/PDFTemplate/content.php");
|
||||
} else
|
||||
include_once ("modules/EcmStockDocOuts/PDFTemplate/content2.php");
|
||||
|
||||
$ec = new EcmSysInfo ();
|
||||
|
||||
$footer = $ec->getFooterForModule('EcmStockDocOuts');
|
||||
$header = $ec->getHeaderForModule('EcmStockDocOuts');
|
||||
$p->SetHTMLHeader($header);
|
||||
$p->SetHTMLFooter($footer);
|
||||
$p->WriteHTML($content);
|
||||
if ($_REQUEST['pdf_type']!='lr') {
|
||||
$p->Output('WZ_'.str_replace('/','',$focus->document_no).'.pdf','I');
|
||||
} else {
|
||||
$p->Output();
|
||||
}
|
||||
166
modules/EcmStockDocOuts/edi/createDeliveryNoteXML.php
Normal file
166
modules/EcmStockDocOuts/edi/createDeliveryNoteXML.php
Normal file
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
class DeliveryNoteEdiXML
|
||||
{
|
||||
|
||||
private $xml;
|
||||
private $id;
|
||||
private $wz;
|
||||
private $sale;
|
||||
|
||||
private $ediDeliveryNotesPath = '/var/edi/twinpol/deliveryNotes/';
|
||||
|
||||
function DeliveryNoteEdiXML ($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->wz = new EcmStockDocOut();
|
||||
$this->wz->retrieve($this->id);
|
||||
$this->sale = new EcmSale();
|
||||
$this->sale->retrieve($this->wz->so_id);
|
||||
}
|
||||
|
||||
public function getXML () {
|
||||
$this->xml = $this->createDeliveryNoteXML();
|
||||
$this->xml->flush();
|
||||
}
|
||||
|
||||
private function createDeliveryNoteXML () {
|
||||
global $timedate;
|
||||
$wz = $this->wz;
|
||||
$sale = $this->sale;
|
||||
$xml = new XMLWriter();
|
||||
$name = str_replace('/', '_', $wz->document_no);
|
||||
$name = str_replace(' ', '', $name);
|
||||
$name = str_replace('DN', '', $name);
|
||||
$xml->openURI($this->ediDeliveryNotesPath . $name . '.xml');
|
||||
$xml->startDocument('1.0', 'UTF-8');
|
||||
$xml->startElement('Document-DespatchAdvice');
|
||||
$xml->startElement('DespatchAdvice-Header');
|
||||
$xml->writeElement('DespatchAdviceNumber', $wz->document_no); // numer delivery note
|
||||
$xml->writeElement('DespatchAdviceDate', $timedate->to_db_date($wz->register_date));
|
||||
// create element DeliveryDate with register_date plus one day
|
||||
$date = new DateTime($wz->register_date);
|
||||
$date->add(new DateInterval('P1D'));
|
||||
if ($date->format('N') == 6) { // sobota/niedziela => poniedziałek
|
||||
$date->add(new DateInterval('P2D'));
|
||||
} elseif ($date->format('N') == 7) {
|
||||
$date->add(new DateInterval('P1D'));
|
||||
}
|
||||
$xml->writeElement('ExpectedDeliveryDate', $date->format('Y-m-d')); // spodziewana data dostawy
|
||||
$xml->writeElement('ExpectedDeliveryTime', '10:00'); // spodziewana godzina dostawy
|
||||
$xml->writeElement('EstimatedDeliveryDate', $date->format('Y-m-d')); // spodziewana data dostawy
|
||||
$xml->writeElement('EstimatedDeliveryTime', '10:00'); // spodziewana godzina dostawy
|
||||
$xml->writeElement('EstimatedDeliveryDate', $date->format('Y-m-d')); // spodziewana data dostawy
|
||||
$xml->writeElement('EstimatedDeliveryTime', '08:00'); // spodziewana godzina dostawy
|
||||
$xml->writeElement('EarliestDeliveryDate', $date->format('Y-m-d'));
|
||||
$xml->writeElement('EarliestDeliveryTime', '08:00');
|
||||
$date->add(new DateInterval('P3D'));
|
||||
if ($date->format('N') == 6) { // sobota/niedziela => poniedziałek
|
||||
$date->add(new DateInterval('P2D'));
|
||||
} elseif ($date->format('N') == 7) {
|
||||
$date->add(new DateInterval('P1D'));
|
||||
}
|
||||
$xml->writeElement('LatestDeliveryDate', $date->format('Y-m-d'));
|
||||
$xml->writeElement('LatestDeliveryTime', '16:00');
|
||||
$xml->writeElement('BuyerOrderNumber', $sale->parent_document_no);
|
||||
$xml->writeElement('SupplierOrderNumber', $sale->document_no);
|
||||
$xml->writeElement('BuyerOrderDate', $timedate->to_db_date($sale->register_date));
|
||||
$xml->writeElement('SupplierOrderDate', $timedate->to_db_date($sale->register_date));
|
||||
$xml->writeElement('DespatchNumber', $wz->document_no);
|
||||
$xml->writeElement('DespatchDate', $timedate->to_db_date($wz->register_date));
|
||||
$xml->writeElement('ShipmentDate', $timedate->to_db_date($wz->register_date));
|
||||
$xml->writeElement('MessageType', 'DA');
|
||||
$xml->writeElement('DocumentFunctionCode', 'O');
|
||||
$xml->endElement(); // DespatchAdvice-Header
|
||||
$xml->startElement('DespatchAdvice-Parties');
|
||||
$xml->startElement('Buyer');
|
||||
$a = new Account();
|
||||
$a->retrieve($sale->parent_id);
|
||||
if (! $sale->parent_iln || $sale->parent_iln == '')
|
||||
$sale->parent_iln = $a->iln;
|
||||
$xml->writeElement('ILN', $sale->parent_iln);
|
||||
$xml->writeElement('TaxID', $sale->parent_nip);
|
||||
$xml->writeElement('Name', $sale->parent_name);
|
||||
$xml->writeElement('StreetAndNumber', $sale->parent_address_street);
|
||||
$xml->writeElement('CityName', $sale->parent_address_city);
|
||||
$xml->writeElement('PostalCode', $sale->parent_address_postalcode);
|
||||
$xml->writeElement('Country', 'PL');
|
||||
$xml->endElement(); // Buyer
|
||||
$xml->startElement('Seller');
|
||||
$xml->writeElement('ILN', '5909000837119');
|
||||
$xml->writeElement('TaxID', '8792676609');
|
||||
$xml->writeElement('Name', 'Twinpol Sp. z o.o.');
|
||||
$xml->writeElement('StreetAndNumber', 'Al. Lipowa 48');
|
||||
$xml->writeElement('CityName', 'Obrowo');
|
||||
$xml->writeElement('PostalCode', '87-126');
|
||||
$xml->writeElement('Country', 'PL');
|
||||
$xml->endElement(); // Seller
|
||||
$xml->startElement('DeliveryPoint');
|
||||
$xml->writeElement('ILN', $sale->shipping_iln);
|
||||
$xml->writeElement('Name', $sale->shipping_address_name);
|
||||
$xml->writeElement('StreetAndNumber', $sale->shipping_address_street);
|
||||
$xml->writeElement('CityName', $sale->shipping_address_city);
|
||||
$xml->writeElement('PostalCode', $sale->shipping_address_postalcode);
|
||||
$xml->writeElement('Country', 'PL');
|
||||
$xml->endElement(); // DeliveryPoint
|
||||
$xml->startElement('SellerHeadquarters');
|
||||
$xml->writeElement('ILN', '5909000837119');
|
||||
$xml->writeElement('TaxID', '8792676609');
|
||||
$xml->writeElement('Name', 'Twinpol Sp. z o.o.');
|
||||
$xml->writeElement('StreetAndNumber', 'Al. Lipowa 48');
|
||||
$xml->writeElement('CityName', 'Obrowo');
|
||||
$xml->writeElement('PostalCode', '87-126');
|
||||
$xml->writeElement('Country', 'PL');
|
||||
$xml->endElement(); // SellerHeadquarters
|
||||
$xml->startElement('ShipFrom');
|
||||
$xml->writeElement('ILN', '5909000837119');
|
||||
$xml->writeElement('TaxID', '8792676609');
|
||||
$xml->writeElement('Name', 'Twinpol Sp. z o.o.');
|
||||
$xml->writeElement('StreetAndNumber', 'Al. Lipowa 48');
|
||||
$xml->writeElement('CityName', 'Obrowo');
|
||||
$xml->writeElement('PostalCode', '87-126');
|
||||
$xml->writeElement('Country', 'PL');
|
||||
$xml->endElement(); // ShipFrom
|
||||
$xml->endElement(); // DespatchAdvice-Parties
|
||||
|
||||
$xml->startElement('DespatchAdvice-Consignment');
|
||||
$xml->startElement('Packing-Sequence');
|
||||
$xml->startElement('Packing-Reference');
|
||||
$xml->writeElement('PackageId', '1');
|
||||
$xml->endElement(); // Packing-Reference
|
||||
|
||||
$xml->startElement('Line');
|
||||
$pl = $wz->getPositionList(true);
|
||||
$db = $GLOBALS['db'];
|
||||
foreach ($pl as $p) {
|
||||
$ean = $db->fetchByAssoc($db->query("SELECT ean as ean FROM ecmproducts WHERE id = '" . $p['product_id'] . "'"));
|
||||
if (strlen($p['name']) > 70){
|
||||
mb_internal_encoding("UTF-8");
|
||||
|
||||
$p['name'] = mb_substr($p['name'], 0, 67, "utf-8") . '...';
|
||||
|
||||
}
|
||||
$xml->startElement('Line-Item');
|
||||
$xml->writeElement('LineNumber', $p['position']+1);
|
||||
$xml->writeElement('EAN', $ean['ean']);
|
||||
$xml->writeElement('BuyerItemCode', $p['recipient_code']);
|
||||
$xml->writeElement('SupplierItemCode', $p['product_code']);
|
||||
$xml->writeElement('ItemDescription', $p['name']);
|
||||
$xml->writeElement('QuantityDespatched', $p['quantity']);
|
||||
$xml->endElement(); // Line
|
||||
}
|
||||
$xml->endElement(); // Lines
|
||||
$xml->endElement(); // Packing-Sequence
|
||||
$xml->endElement(); // DespatchAdvice-Consignment
|
||||
$xml->endElement(); // Document-DespatchAdvice
|
||||
return $xml;
|
||||
}
|
||||
}
|
||||
|
||||
function brecho() {
|
||||
echo '<pre>';
|
||||
foreach (func_get_args() as $arg) {
|
||||
print_r($arg);
|
||||
echo "<br>";
|
||||
}
|
||||
echo '</pre>';
|
||||
}
|
||||
18
modules/EcmStockDocOuts/getEDIDeliveryNote.php
Normal file
18
modules/EcmStockDocOuts/getEDIDeliveryNote.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if (!$_REQUEST['record'])
|
||||
die('Brak rekordu');
|
||||
|
||||
$wz = new EcmStockDocOut();
|
||||
$wz->retrieve($_REQUEST['record']);
|
||||
$client = new Account();
|
||||
$client->retrieve($wz->parent_id);
|
||||
|
||||
if ($client->parent_id == '1249' // MediaSaturnHolding
|
||||
) {
|
||||
require_once('modules/EcmStockDocOuts/edi/createDeliveryNoteXML.php');
|
||||
$xml = new deliveryNoteEdiXML($_REQUEST['record']);
|
||||
$xml->getXML();
|
||||
echo 'Plik został wygenerowany sprawdź poprawność wysyłki.';
|
||||
} else {
|
||||
echo "Odbiorca nie wspierany.";
|
||||
}
|
||||
1
modules/EcmStockDocOuts/javahelper.php
Executable file
1
modules/EcmStockDocOuts/javahelper.php
Executable file
@@ -0,0 +1 @@
|
||||
<?php require_once('modules/EcmStockDocOuts/javascript/helper.php');
|
||||
345
modules/EcmStockDocOuts/javascript/helper.php
Executable file
345
modules/EcmStockDocOuts/javascript/helper.php
Executable file
@@ -0,0 +1,345 @@
|
||||
<?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_id'],$_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 'getItemsFromEcmSale': getItemsFromEcmSale($_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 'getStockStates' : getStockStates($_POST['ids'], $_POST['stockId']); break;
|
||||
case 'getComponents' : getComponents($_POST['product_id']); break;
|
||||
}
|
||||
function getParentInfo($id, $type) {
|
||||
if (!$id || $id == '') die('-1');
|
||||
|
||||
$a = new Account();
|
||||
$a->retrieve($id);
|
||||
$data = array();
|
||||
$data['name'] = html_entity_decode( $a->name);
|
||||
$data['parent_nip'] = $a->to_vatid;
|
||||
$data['parent_address_street'] = $a->register_address_street;
|
||||
$data['parent_address_postalcode'] = $a->register_address_postalcode;
|
||||
$data['parent_address_city'] = $a->register_address_city;
|
||||
$data['parent_address_country'] = $a->register_address_country;
|
||||
$data['invoice_type'] = $a->invoice_type;
|
||||
$data['currency_id'] = $a->currency_id;
|
||||
$data['iln'] = $a->iln;
|
||||
$data['vat_payer'] = $a->vat_payer;
|
||||
if ($a->ecmpaymentcondition_id && $a->ecmpaymentcondition_id!='') {
|
||||
$pc = new EcmPaymentCondition();
|
||||
$pc->retrieve($a->ecmpaymentcondition_id);
|
||||
$data['ecmpaymentcondition_id'] = $pc->id;
|
||||
$data['ecmpaymentcondition_name'] = $pc->name;
|
||||
}
|
||||
if ($a->ecmdeliverycondition_id && $a->ecmdeliverycondition_id!='') {
|
||||
$pc = new EcmdeliveryCondition();
|
||||
$pc->retrieve($a->ecmdeliverycondition_id);
|
||||
$data['ecmdeliverycondition_id'] = $pc->id;
|
||||
$data['ecmdeliverycondition_name'] = $pc->name;
|
||||
}
|
||||
|
||||
if ($a->ecmprice_id && $a->ecmprice_id!='') {
|
||||
$pr = new EcmPrice();
|
||||
$pr->retrieve($a->ecmprice_id);
|
||||
$data['ecmprice_id'] = $pr->id;
|
||||
$data['ecmprice_name'] = $pr->name;
|
||||
}
|
||||
//get pricebooks, ownership pricebooks
|
||||
$pricebooks = array();
|
||||
$db=$GLOBALS['db'];
|
||||
$res = $db->query("SELECT id, name FROM ecmpricebooks WHERE account_id IN ('".$a->id."','".$a->parent_id."') AND active='1' AND deleted='0'");
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['id'] = $row['id'];
|
||||
$tmp['name'] = $row['name'];
|
||||
$pricebooks[] = $tmp;
|
||||
unset($tmp);
|
||||
}
|
||||
$data['pricebooks'] = $pricebooks;
|
||||
//document validation fields
|
||||
$data['document_recipient_code'] = $a->document_recipient_code;
|
||||
$data['document_parent_order_no'] = $a->document_parent_order_no;
|
||||
$data['document_delivery_address'] = $a->document_delivery_address;
|
||||
$data['document_parent_iln'] = $a->document_parent_iln;
|
||||
$data['document_shipping_iln'] = $a->document_shipping_iln;
|
||||
$data['document_parent_nip'] = $a->document_parent_nip;
|
||||
$data['document_shipping_nip'] = $a->document_shipping_nip;
|
||||
|
||||
//delivery addresses && ownership addresses
|
||||
$addresses = array();
|
||||
//delivery
|
||||
$delivery = $a->getPositionList(true);
|
||||
foreach ($delivery as $d) {
|
||||
$address = array();
|
||||
$address['name'] = $d['name'];
|
||||
$address['street'] = $d['street'];
|
||||
$address['postalcode'] = $d['postalcode'];
|
||||
$address['city'] = $d['city'];
|
||||
$address['country'] = $d['country'];
|
||||
$addresses[] = $address;
|
||||
unset($address);
|
||||
}
|
||||
//ownership
|
||||
$res = $db->query("SELECT name, shipping_address_street, shipping_address_postalcode, shipping_address_city, shipping_address_country, iln, to_vatid FROM accounts WHERE parent_id='$a->id'");
|
||||
while ($r = $db->fetchByAssoc($res)) {
|
||||
$address = array();
|
||||
$address['name'] = $r['name'];
|
||||
$address['street'] = $r['shipping_address_street'];
|
||||
$address['postalcode'] = $r['shipping_address_postalcode'];
|
||||
$address['city'] = $r['shipping_address_city'];
|
||||
$address['country'] = $r['shipping_address_country'];
|
||||
$address['iln'] = $r['iln'];
|
||||
$address['nip'] = $r['to_vatid'];
|
||||
$addresses[] = $address;
|
||||
unset($address);
|
||||
}
|
||||
|
||||
$data['addresses'] = $addresses;
|
||||
unset($addresses);
|
||||
|
||||
echo json_encode($data);
|
||||
unset($data);
|
||||
unset($a);
|
||||
unset($res);
|
||||
return;
|
||||
}
|
||||
|
||||
function generateNumber($mag,$date) {
|
||||
$data = array();
|
||||
$data['number'] = EcmStockDocOut::generateNumber($date);
|
||||
$data['document_no'] = EcmStockDocOut::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.OO, p.vat_id, p.vat_name, p.vat_value, p.is_consignment, p.id, p.code, p.name, p.unit_id, p.product_category_id, p.pieces_per_carton, p.un_code 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 getItemsFromEcmSale($record) {
|
||||
$s = new EcmSale();
|
||||
$s->retrieve($record);
|
||||
$pl = $s->getPositionList(true);
|
||||
unset($s);
|
||||
echo json_encode($pl);
|
||||
return;
|
||||
}
|
||||
function getItems($record) {
|
||||
$mm = new EcmStockDocOut();
|
||||
$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 getStockStates($ids, $stock_id) {
|
||||
$ids = explode("|", $ids);
|
||||
// foreach ids
|
||||
$res = array();
|
||||
foreach ($ids as $id) {
|
||||
$p = array();
|
||||
$p['id'] = $id;
|
||||
$p['state'] = EcmStockOperation::getStock($id, $stock_id);
|
||||
$res[] = $p;
|
||||
}
|
||||
echo json_encode($res);
|
||||
}
|
||||
|
||||
function getComponents($product_id) {
|
||||
$p = new EcmProduct();
|
||||
$p->retrieve($product_id);
|
||||
echo json_encode($p->getPositionList(true));
|
||||
return;
|
||||
}
|
||||
|
||||
445
modules/EcmStockDocOuts/language/en_us.lang.php
Executable file
445
modules/EcmStockDocOuts/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/EcmStockDocOuts/language/ge_ge.lang.php
Executable file
424
modules/EcmStockDocOuts/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 (%)',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
421
modules/EcmStockDocOuts/language/pl_pl.lang.php
Executable file
421
modules/EcmStockDocOuts/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,421 @@
|
||||
<?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_SHIPPING_ADDRESS' => 'Adres dostawy',
|
||||
'LBL_SHIPPING_ADDRESS_NAME' => 'Nazwa',
|
||||
'LBL_PARENT_ILN' => 'Numer ILN',
|
||||
'LBL_PARENT_NIP' => 'NIP',
|
||||
'LBL_ORDER_NO' => 'Nr zamówienia klienta',
|
||||
'LBL_ORDER_QTY' => 'Ilość',
|
||||
'LBL_DELIVERY_DATE'=>'Data dostawy',
|
||||
'LBL_STOCK_NAME' => 'Magazyn',
|
||||
'LBL_ECMPRICE' => 'Ceny B2B',
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_PDF_TEXT' => 'Tekst na PDFie',
|
||||
'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_PDF_CONTENT_INVOICE_FOR'=>'NABYWCA',
|
||||
'LBL_PRICEBOOK' => 'Cennik',
|
||||
'LBL_EDITTABLE_RECIPIENT_CODE' => 'Kod Odbiorcy',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_DETAIL_BUTTON' => 'Szczegóły',
|
||||
'LNK_ECMSTOCKDOCOUTS_LIST'=>'Lista Dokumentów WZ',
|
||||
'LNK_NEW_ECMSTOCKDOCOUT'=>'Utwórz Dokument WZ',
|
||||
// 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',
|
||||
'LBL_NIP'=>'NIP',
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'WZ',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Dokumenty WZ: Strona Główna',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmStockDocOuts',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista WZ',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowa Oferta',
|
||||
|
||||
'LBL_DETAILS' => 'WZ',
|
||||
|
||||
'LBL_ITEMS' => 'WZ',
|
||||
|
||||
'LBL_TEXTS' => 'Teksty do PDFa:',
|
||||
|
||||
'LBL_PREVIEW' => 'Podglad PDFa:',
|
||||
|
||||
'LBL_EMAIL' => 'Stwórz Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'Informacje o firmie:',
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Szczególy',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Produkty',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Teksty',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Podglad',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Data dodania',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date modyfikacji',
|
||||
|
||||
'LBL_MODIFIED' => 'Ostatnio modyfikowane',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisane Do',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane Do',
|
||||
|
||||
'LBL_CREATED' => 'Utworzone Przez',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Utworzone Przez',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Zmodyfikowane Przez',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Przypisane Do',
|
||||
|
||||
'LBL_DELETED_BY' => 'Usuniete Przez',
|
||||
|
||||
'LBL_NUMBER' => 'Numer',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Numer',
|
||||
|
||||
'LBL_PARENT' => 'Do',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Firma',
|
||||
|
||||
'LBL_PARENT_ID' => 'Firma Id',
|
||||
|
||||
'LBL_TYPE' => 'Typ',
|
||||
|
||||
'LBL_ECMQUOTE_ID' => 'Id Oferty',
|
||||
|
||||
'LBL_ECMQUOTE_NAME' => 'Nazwa Oferty',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Data Dokumentu',
|
||||
|
||||
'LBL_SELL_DATE' => 'Data Sprzedazy',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Data Platnosci',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Ulica',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Kod pocztowy / Miasto',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Panstwo',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Czy jest wolne od vatu?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Tekst naglówka',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Tekst stopki',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Dodatkowy tekst',
|
||||
|
||||
'LBL_SUBTOTAL' => 'Suma',
|
||||
|
||||
'LBL_TOTAL' => 'Suma',
|
||||
|
||||
'LBL_DISCOUNT' => 'Upust',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Zaakceptowane',
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Id Szablonu',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Szablon',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Warunki Platnosci',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Warunki Platnosci ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Warunki Dostawy',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Warunki Dostawy ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Blad formatu numeru!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'Wystepuja bledy na liscie produktów albo w formularzu!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Blad formatu upustu',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Kod',
|
||||
'LBL_EDITTABLE_NAME' => 'Nazwa',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Ilosc',
|
||||
'LBL_EDITTABLE_PRICE' => 'Cena',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Upust',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Suma',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opcje',
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'W góre',
|
||||
'LBL_MOVE_ROW_DOWN' => 'W dól',
|
||||
'LBL_INSERT_NEW_ROW' => 'Wstaw nowy wiersz',
|
||||
'LBL_DELETE_ROW' => 'Usun wiersz',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Wazne do',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMQUOTE' => 'Utwórz Ofertę',
|
||||
|
||||
'LNK_ECMQUOTES_LIST' => 'Lista Ofert',
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_IMG_NEW' => 'Nowy, dodaj do bazy',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edycja',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Chcesz potwierdzic tą Ofertę?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Pokaz PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Pokaz PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Pokaz Ofertę w pliku PDF.',
|
||||
|
||||
'LBL_QUOTE_TO_INVOICE' => 'Stwórz Fakture',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_KEY' => 'Stwórz Fakture [Alt+I]',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_TITLE' => 'Stwórz Fakture.',
|
||||
|
||||
'LBL_QUOTE_TO_SALE' => 'Stwórz Zamówienie Sprzedazy',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Stwórz Zamówienie Sprzedazy [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Stwórz Zamówienie Sprzedazy.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Wyslij Do Potwierdzenia',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Wyslij Do Potwierdzenia [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Wyslij Do Potwierdzenia.',
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Stwórz Fakture.',
|
||||
'LBL_LIST_TO_SALE' => 'Stwórz Zamówienie Sprzedazy.',
|
||||
|
||||
// buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Zapisz i Wyslij [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Zapisz i Wyslij',
|
||||
|
||||
'LBL_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' ,
|
||||
'LBL_PDF_CONTENT_REGISTER_DATE' => 'Data wystawienia:',
|
||||
'LBL_PDF_CONTENT_ISSUED_BY' => 'Wystawił:',
|
||||
'LBL_PDF_CONTENT_PARENT_DOCUMENT_NO'=>'Nr zamówienia klienta:',
|
||||
'LBL_PDF_CONTENT_ORDER_QTY'=>'Ilość:',
|
||||
'LBL_PDF_DOCUMENT_NO'=>'WZ nr',
|
||||
'LBL_PDF_CONTENT_DELIVERY'=>'ODBIORCA',
|
||||
'LBL_PDF_CONTENT_NIP'=>'NIP:',
|
||||
'LBL_PDF_STOCK'=>'Magazyn:',
|
||||
);
|
||||
|
||||
?>
|
||||
125
modules/EcmStockDocOuts/metadata/SearchFields.php
Executable file
125
modules/EcmStockDocOuts/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['EcmStockDocOuts'] = 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' ),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
226
modules/EcmStockDocOuts/metadata/detailviewdefs.php
Normal file
226
modules/EcmStockDocOuts/metadata/detailviewdefs.php
Normal file
@@ -0,0 +1,226 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
global $app_list_strings;
|
||||
$viewdefs ['EcmStockDocOuts'] ['DetailView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array (
|
||||
'CANCEL_DOC',
|
||||
array (
|
||||
'customCode' => '{if $inv_button==true}<input title="{$APP.LBL_CREATE_RECEIPT}" accessKey="{$APP.LBL_CREATE_RECEIPT}" class="button" onclick="javascript:window.open(\'index.php?module=EcmInvoiceOuts&action=EditView&isWZ=true&record={$id}\');" type="button" name="create_fk" value="Utwórz Fakturę" id="create_fk">{/if}'
|
||||
),
|
||||
array (
|
||||
'customCode' => "{include_php file='include/ECM/EcmCreatePdfButton.php'}"
|
||||
),
|
||||
array(
|
||||
'customCode' => '{if $EDI == true}<input name="edi" id="edi" class="button" onclick="window.open(\'index.php?module=EcmStockDocOuts&record={$fields.id.value}&action=getEDIDeliveryNote&to_pdf=1\');" type="button" value="EDI - wyślij awizację dostawy">{/if}',
|
||||
),
|
||||
),
|
||||
'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_brutto.value|number_format:2:",":"."}\'>',
|
||||
'<input type="hidden" id="doc_total_quantity" value=\'{$quantity}\'>',
|
||||
'<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/EcmStockDocOuts/javascript/EcmStockDocOutsDetail.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/helper.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/bimit_table2.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/columndefs-detail.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_DETAILS_TAB' => array (
|
||||
array (
|
||||
'document_no',
|
||||
'assigned_user_name'
|
||||
),
|
||||
array (
|
||||
'parent_name',
|
||||
'stock_name'
|
||||
),
|
||||
array (
|
||||
'order_no',
|
||||
'register_date'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
'label' => 'LBL_CURRENCY'
|
||||
),
|
||||
'delivery_date'
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'category',
|
||||
'label' => 'LBL_CATEGORY'
|
||||
),
|
||||
'order_qty'
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'zs_no',
|
||||
'label' => 'Dokument ZS',
|
||||
'customCode'=>'{$zs_no}'
|
||||
),
|
||||
array(
|
||||
'name' => 'fv_no',
|
||||
'label' => 'Dokument FV',
|
||||
'customCode'=>'{$fk_no}'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<br><b>{$MOD.LBL_TO_INFORMATIONS}</b>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_name_copy',
|
||||
'customCode' => '{$fields.parent_name.value}'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'parent_address_street'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => 't',
|
||||
'customCode' => '{$fields.parent_address_postalcode.value} {$fields.parent_address_city.value}'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'parent_address_country'
|
||||
),
|
||||
array (
|
||||
'parent_nip'
|
||||
),
|
||||
array (
|
||||
'parent_iln'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<br><b>{$MOD.LBL_SHIPPING_ADDRESS}</b>'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address_name',
|
||||
'customCode' => '{$fields.shipping_address_name.value}'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'shipping_address_street'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address_city',
|
||||
'tabIndex' => 't',
|
||||
'customCode' => '{$fields.shipping_address_postalcode.value} {$fields.shipping_address_city.value}'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'shipping_address_country'
|
||||
),
|
||||
array (
|
||||
'pdf_text'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<br>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$MODIFIED_BY_NAME}'
|
||||
),
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$CREATED_BY_NAME}'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_ITEMS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<div id="itemsTable"></div>'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
309
modules/EcmStockDocOuts/metadata/editviewdefs.php
Normal file
309
modules/EcmStockDocOuts/metadata/editviewdefs.php
Normal file
@@ -0,0 +1,309 @@
|
||||
<?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 ['EcmStockDocOuts'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'enctype' => 'multipart/form-data',
|
||||
'buttons' => array (
|
||||
array (
|
||||
'customCode' => '<input class="button primary" type="button" value="Zapisz" name="button" onclick="saveDocument();" accesskey="S" title="Zapisz [Alt+S]">'
|
||||
),
|
||||
'CANCEL'
|
||||
),
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="new_number" id="new_number" value=\'{$NEW_NUMBER}\'>',
|
||||
'<input type="hidden" id="duplicate" name="duplicate" value=\'{$DUPLICATE}\'>',
|
||||
'<input type="hidden" id="ecmsale" name="ecmsale" value=\'{$ECMSALE}\'>',
|
||||
'<input type="hidden" id="so_id" name="so_id" value=\'{$ECMSALE_ID}\'>',
|
||||
'<input type="hidden" id="ecmsale_id" name="ecmsale_id" value=\'{$ECMSALE_ID}\'>',
|
||||
'<input type="hidden" id="position_list" name="position_list" value="">',
|
||||
'<input type="hidden" id="ecommerce_products" name="ecommerce_products" value=\'{$ECOMMERCE_PRODUCTS}\'>',
|
||||
'<input type="hidden" id="ecommerce_invoices" name="ecommerce_invoices" value=\'{$ECOMMERCE_INVOICES}\'>',
|
||||
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/EcmStockDocOuts.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/bimit_table2.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/columndefs.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/ECM/EcmDocumentNumberGenerator/EcmDocumentNumberGenerator.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/EcmStockDocOuts/javascript/Consignments.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_DETAILS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'type' => 'tab',
|
||||
'active' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<div id="tst" style="display:none;"></div><input readonly="readonly" type="text" name="document_no" id="document_no" value=\'{$fields.document_no.value}\'>
|
||||
<input type="hidden" name="number" id="number" value=\'{$fields.number.value}\'>'
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'stock_id',
|
||||
'label' => 'LBL_STOCK_NAME',
|
||||
'customCode' => '{$STOCK}'
|
||||
),
|
||||
array (
|
||||
'name' => 'order_no',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_name',
|
||||
'tabIndex' => '1',
|
||||
'displayParams' => array (
|
||||
'required' => true,
|
||||
'size' => 45
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'register_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array (
|
||||
'showFormats' => true
|
||||
)
|
||||
)
|
||||
)
|
||||
,
|
||||
array (
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
'label' => 'LBL_CURRENCY'
|
||||
),
|
||||
array (
|
||||
'name' => 'category',
|
||||
'label' => 'LBL_CATEGORY'
|
||||
)
|
||||
)
|
||||
,
|
||||
array (
|
||||
array (
|
||||
'name' => 'delivery_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array (
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
'order_qty'
|
||||
),
|
||||
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_TO_INFORMATIONS}</h4>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_name_copy',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input type="text" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" readOnly="readonly" style="width:450px" />'
|
||||
),
|
||||
array (
|
||||
'name' => 'ecmlanguage',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_street',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<textarea tabindex="1" id="parent_address_street" name="parent_address_street" style="width:450px;height:50px;" maxlength="150" >{$fields.parent_address_street.value}</textarea>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input maxlength="8" type="text" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" style="vertical-align:top;width:80px;" /> <input type="text" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" style="vertical-align:top;width:150px;" />'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_country',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_nip',
|
||||
'label' => 'LBL_NIP',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_iln',
|
||||
'label' => 'ILN',
|
||||
'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_SHIPPING_ADDRESS}</h4>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address',
|
||||
'customCode' => ' <div id=\'addresses\'></div>'
|
||||
),
|
||||
''
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address_name',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input type="text" name="shipping_address_name" id="shipping_address_name" value="{$fields.shipping_address_name.value}" style="width:450px;" />'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address_street',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<textarea tabindex="1" id="shipping_address_street" name="shipping_address_street" style="width:450px;height:50px;" maxlength="150" >{$fields.shipping_address_street.value}</textarea>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address_city',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input maxlength="8" type="text" name="shipping_address_postalcode" id="shipping_address_postalcode" value="{$fields.shipping_address_postalcode.value}" style="vertical-align:top;width:80px;" /> <input type="text" name="shipping_address_city" id="shipping_address_city" value="{$fields.shipping_address_city.value}" style="vertical-align:top;width:150px;" />'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'shipping_address_country',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_PDF_TEXT}</h4>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'name' => 'pdf_text'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_ITEMS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'type' => 'tab'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<div id="searchProducts" class="edit view search basic">
|
||||
<br>
|
||||
<input type="hidden" id="searchStart" name="searchStart" value="0">
|
||||
<input type="hidden" id="searchCount" name="searchCount" value="">
|
||||
<input type="hidden" id="searchSort" name="searchSort" value="1">
|
||||
{$MOD.LBL_SEARCH}:
|
||||
<input type="text" value="" id="searchProductsInput"/>
|
||||
<img onclick="$(\'#searchProductsInput\').val(\'%\');searchProducts();" src="modules/EcmSales/images/search.gif" style="cursor: pointer;">
|
||||
{$MOD.LBL_CATEGORY}:
|
||||
<select id="productSearchCategory"></select>
|
||||
{$MOD.LBL_SEARCH_STOCK}:
|
||||
<select id="productSearchStock" onchange="searchProducts();">
|
||||
<option value="1">Produkty</option>
|
||||
<option value="4" selected="selected">Magazyn </option>
|
||||
<option value="3">Dostępne</option>
|
||||
</select>
|
||||
|
||||
<button onclick="createProduct();" class="button" type="button"><img src="themes/default/images/id-ff-add.png"></button>
|
||||
<input type="hidden" id="newProductId" value=""/>
|
||||
</div>
|
||||
<div id="searchResultDiv"/></div>
|
||||
<br><br><div id="itemsTable"></div>'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
126
modules/EcmStockDocOuts/metadata/listviewdefs.php
Executable file
126
modules/EcmStockDocOuts/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,126 @@
|
||||
<?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 ["EcmStockDocOuts"] = array (
|
||||
|
||||
'NUMBER' => array (
|
||||
'width' => '3',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
|
||||
'PARENT_NAME' => array (
|
||||
'width' => '10',
|
||||
'label' => 'Odbiorca',
|
||||
'default' => true,
|
||||
'sortable' => false
|
||||
),
|
||||
|
||||
'TOTAL_BRUTTO' => array (
|
||||
'width' => '5',
|
||||
'label' => 'Wartość Brutto',
|
||||
'align' => 'right',
|
||||
'default' => true,
|
||||
'sumType' => 'sum',
|
||||
),
|
||||
|
||||
'STOCK_NAME' => array (
|
||||
'width' => '5',
|
||||
'label' => 'LBL_STOCK_NAME',
|
||||
'default' => true
|
||||
),
|
||||
|
||||
'CREATED_BY' =>
|
||||
array (
|
||||
'width' => '4%',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'module' => 'Users',
|
||||
'id' => 'CREATED_BY',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'DOCUMENT_AUTOINCREMENT' => array(
|
||||
'width' => '5',
|
||||
'label' => 'Data dokumentu',
|
||||
'default' => true,
|
||||
|
||||
),
|
||||
'INVOICE_DOC' => array (
|
||||
'width' => '5',
|
||||
'label' => 'Faktura',
|
||||
'default' => true,
|
||||
'sortable' => FALSE
|
||||
),
|
||||
'ZS' => array(
|
||||
'width' => '3',
|
||||
'label' => 'Dokument ZS',
|
||||
'default' => true,
|
||||
'sortable'=>false,
|
||||
'align'=>'left',
|
||||
'link' => false,
|
||||
|
||||
),
|
||||
'OPTIONS' => array (
|
||||
'width' => '2',
|
||||
'label' => 'PDF',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'center'
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
?>
|
||||
85
modules/EcmStockDocOuts/metadata/searchdefs.php
Executable file
85
modules/EcmStockDocOuts/metadata/searchdefs.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?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['EcmStockDocOuts'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'document_no' => array(
|
||||
'name' => 'document_no',
|
||||
'label' => 'Numer WZ'
|
||||
),
|
||||
'parent_name',
|
||||
'register_date',
|
||||
array(
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool'
|
||||
),
|
||||
array(
|
||||
'name' => 'category',
|
||||
'label' => 'LBL_CATEGORY',
|
||||
'type' => 'enum'
|
||||
),
|
||||
'stock_id',
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'document_no' => array(
|
||||
'name' => 'document_no',
|
||||
'label' => 'Numer WZ'
|
||||
),
|
||||
'parent_name',
|
||||
'register_date',
|
||||
array(
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool'
|
||||
),
|
||||
array(
|
||||
'name' => 'category',
|
||||
'label' => 'LBL_CATEGORY',
|
||||
'type' => 'enum'
|
||||
),
|
||||
'stock_id',
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
76
modules/EcmStockDocOuts/metadata/studio.php
Executable file
76
modules/EcmStockDocOuts/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/EcmStockDocOuts/metadata/subpaneldefs.php
Executable file
121
modules/EcmStockDocOuts/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(),
|
||||
|
||||
),
|
||||
*/
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
129
modules/EcmStockDocOuts/metadata/subpanels/ForProduct.php
Executable file
129
modules/EcmStockDocOuts/metadata/subpanels/ForProduct.php
Executable file
@@ -0,0 +1,129 @@
|
||||
<?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%',
|
||||
),
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '10%',
|
||||
'vname' => 'Kontrahent',
|
||||
'default' => true,
|
||||
),
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'Data dokumentu',
|
||||
'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' => '',
|
||||
'vname' => ' ',
|
||||
'module' => 'EcmSales',
|
||||
'width' => '60%',
|
||||
),
|
||||
/*
|
||||
'PDF_URL' => array(
|
||||
'width' => '2%',
|
||||
'label' => ' ',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
124
modules/EcmStockDocOuts/metadata/subpanels/default.php
Executable file
124
modules/EcmStockDocOuts/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%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
575
modules/EcmStockDocOuts/vardefs.php
Executable file
575
modules/EcmStockDocOuts/vardefs.php
Executable file
@@ -0,0 +1,575 @@
|
||||
<?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 ['EcmStockDocOut'] = array (
|
||||
'table' => "ecmstockdocouts",
|
||||
'comment' => 'EcmStockDocOuts',
|
||||
'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'
|
||||
),
|
||||
'so_id' => array (
|
||||
'name' => 'so_id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => false,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'document_autoincrement' => array (
|
||||
'name' => 'document_autoincrement',
|
||||
'vname' => 'Data dokumentu',
|
||||
'type' => 'varchar',
|
||||
'reportable' => true,
|
||||
// 'source' => 'non-db',
|
||||
'required' => false
|
||||
),
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'name',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => true,
|
||||
'comment' => 'The short description of the record contents',
|
||||
'massupdate' => true,
|
||||
'merge_filter' => 'selected'
|
||||
),
|
||||
'ecmproduct_id' =>
|
||||
array (
|
||||
'name' => 'ecmproduct_id',
|
||||
'vname' => 'produkt',
|
||||
'type' => 'varchar',
|
||||
'len' => '244',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'description' => array (
|
||||
'type' => 'text',
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'comment' => 'Description',
|
||||
'unified_search' => true
|
||||
// 'required' => true,
|
||||
),
|
||||
'date_entered' => array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record created'
|
||||
),
|
||||
'date_modified' => array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record last modified'
|
||||
),
|
||||
'modified_user_id' => array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'required' => true,
|
||||
'reportable' => true,
|
||||
'comment' => 'User who last modified record'
|
||||
),
|
||||
'currency_id' => array (
|
||||
'name' => 'currency_id',
|
||||
'type' => 'enum',
|
||||
'options' => 'currency_dom',
|
||||
'label' => 'LBL_CURRENCY'
|
||||
),
|
||||
'category' => array (
|
||||
'name' => 'category',
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmstockdocouts_category_list',
|
||||
'label' => 'LBL_CATEGORY',
|
||||
),
|
||||
'canceled' => array(
|
||||
'name' => 'canceled',
|
||||
'vname' => 'LBL_DELETED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => false,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
'parent_name' => array(
|
||||
'name'=> 'parent_name',
|
||||
'parent_type'=>'ecmstockdocouts_parent_dom' ,
|
||||
// 'type_name'=>'parent_type',
|
||||
'id_name'=>'parent_id',
|
||||
'vname'=>'LBL_PARENT_NAME',
|
||||
'type'=>'relate',
|
||||
'group'=>'parent_name',
|
||||
'dbtype' => 'varchar',
|
||||
'len' => '255',
|
||||
//'source'=>'non-db',
|
||||
'module' => 'Accounts',
|
||||
'massupdate' => false,
|
||||
// 'options'=> 'ecmstockdocouts_parent_dom',
|
||||
'required' => true,
|
||||
),
|
||||
'parent_id' => array (
|
||||
'name' => 'parent_id',
|
||||
'type' => 'id',
|
||||
'module' => 'Accounts',
|
||||
'vname' => 'LBL_PARENT_ID',
|
||||
'group'=>'parent_name',
|
||||
'massupdate' => false,
|
||||
'reportable'=>false,
|
||||
'required' => true,
|
||||
),
|
||||
'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' => 'ecmstockdocouts' . '_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' => 'ecmstockdocouts' . '_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'assigned_user_link' => array (
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmstockdocouts' . '_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
'duplicate_merge' => 'enabled',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'table' => 'users'
|
||||
),
|
||||
'deleted' => array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
// NEW FIELDS SECTION
|
||||
'number' => array (
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => false,
|
||||
'len' => '20'
|
||||
),
|
||||
'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
|
||||
),
|
||||
'delivery_date' => array (
|
||||
'name' => 'delivery_date',
|
||||
'vname' => 'LBL_DELIVERY_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => false
|
||||
),
|
||||
'total' => array (
|
||||
'name' => 'total_netto',
|
||||
'vname' => 'LBL_SUBTOTAL',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
),
|
||||
'pdf_text' => array (
|
||||
'name' => 'pdf_text',
|
||||
'vname' => 'LBL_PDF_TEXT',
|
||||
'type' => 'text'
|
||||
),
|
||||
'ads_text' => array (
|
||||
'name' => 'ads_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'
|
||||
),
|
||||
'total_netto' => array (
|
||||
'name' => 'total_netto',
|
||||
'vname' => 'LBL_SUBTOTAL',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
),
|
||||
'total_vat' => array (
|
||||
'name' => 'total_vat',
|
||||
'vname' => 'LBL_VAT',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
),
|
||||
'total_brutto' =>
|
||||
array (
|
||||
'name' => 'total_brutto',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
),
|
||||
'vats_summary' =>
|
||||
array (
|
||||
'name' => 'vats_summary',
|
||||
'type' => 'varchar',
|
||||
'len' => '200',
|
||||
),
|
||||
'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,
|
||||
),
|
||||
'parent_nip' => array (
|
||||
'name' => 'parent_nip',
|
||||
'vname' => 'LBL_NIP',
|
||||
'type' => 'id',
|
||||
'required' => FALSE,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'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,
|
||||
),
|
||||
'parent_name_copy' => array (
|
||||
'name' => 'parent_name_copy',
|
||||
'vname' => 'LBL_PARENT_NAME_COPY',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'parent_address_street' => array (
|
||||
'name' => 'parent_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '150',
|
||||
'comment' => 'The street address used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'parent_address_city' => array (
|
||||
'name' => 'parent_address_city',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_CITY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'comment' => 'The city used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'parent_address_postalcode' => array (
|
||||
'name' => 'parent_address_postalcode',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '20',
|
||||
'group' => 'parent_address',
|
||||
'comment' => 'The postal code used for parent address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'parent_address_country' => array (
|
||||
'name' => 'parent_address_country',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
'type' => 'varchar',
|
||||
'group' => 'parent_address',
|
||||
'comment' => 'The country used for the parent address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'shipping_address_name' => array (
|
||||
'name' => 'parent_address_name',
|
||||
'vname' => 'LBL_SHIPPING_ADDRESS_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '205',
|
||||
'group' => 'shipping_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'shipping_address_street' => array (
|
||||
'name' => 'shipping_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '150',
|
||||
'group' => 'shipping_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'shipping_address_city' => array (
|
||||
'name' => 'shipping_address_city',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_CITY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'group' => 'shipping_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'shipping_address_postalcode' => array (
|
||||
'name' => 'shipping_address_postalcode',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '20',
|
||||
'group' => 'shipping_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'shipping_address_country' => array (
|
||||
'name' => 'shipping_address_country',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
'type' => 'varchar',
|
||||
'group' => 'shipping_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'shipping_iln' => array (
|
||||
'name' => 'shipping_iln',
|
||||
'vname' => 'LBL_PARENT_ILN',
|
||||
'type' => 'varchar',
|
||||
'group' => 'parent_address',
|
||||
),
|
||||
'parent_iln' => array (
|
||||
'name' => 'parent_iln',
|
||||
'vname' => 'LBL_PARENT_ILN',
|
||||
'type' => 'varchar',
|
||||
|
||||
),
|
||||
'order_no' =>
|
||||
array (
|
||||
'name'=>'order_no',
|
||||
'vname'=>'LBL_ORDER_NO',
|
||||
'type'=>'varchar',
|
||||
),
|
||||
'parent_nip' =>
|
||||
array (
|
||||
'name'=>'parent_nip',
|
||||
'type'=>'varchar',
|
||||
),
|
||||
'order_qty'=>
|
||||
array (
|
||||
'name'=>'order_qty',
|
||||
'vname'=>'LBL_ORDER_QTY',
|
||||
'type'=>'varchar',
|
||||
),
|
||||
// FOR SUBPANELS
|
||||
|
||||
'notes' => array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmstockdocouts_notes',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES'
|
||||
),
|
||||
),
|
||||
// INDICES SECTION
|
||||
'indices' => array (
|
||||
array (
|
||||
'name' => 'ecmstockdocouts' . 'pk',
|
||||
'type' => 'primary',
|
||||
'fields' => array (
|
||||
'id'
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'idx_' . 'ecmstockdocouts' . '_document_no',
|
||||
'type' => 'index',
|
||||
'fields' => array (
|
||||
'document_no'
|
||||
)
|
||||
) ,
|
||||
),
|
||||
// RELATIONSHIPS SECTION
|
||||
'relationships' => array (
|
||||
'ecmstockdocouts' . '_assigned_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmStockDocOuts',
|
||||
'rhs_table' => 'ecmstockdocouts',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdocouts' . '_modified_user' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmStockDocOuts',
|
||||
'rhs_table' => 'ecmstockdocouts',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdocouts' . '_created_by' => array (
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmStockDocOuts',
|
||||
'rhs_table' => 'ecmstockdocouts',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmstockdocouts_notes' => array (
|
||||
'lhs_module' => 'EcmStockDocOuts',
|
||||
'lhs_table' => 'ecmstockdocouts',
|
||||
'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' => 'EcmStockDocOuts'
|
||||
),
|
||||
),
|
||||
// THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
|
||||
'optimistic_locking' => true
|
||||
);
|
||||
95
modules/EcmStockDocOuts/views/DetailView/view.detail.my.php
Executable file
95
modules/EcmStockDocOuts/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/EcmStockDocOuts/views/EditView/view.edit.ecmstockdocouts.php
Executable file
184
modules/EcmStockDocOuts/views/EditView/view.edit.ecmstockdocouts.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 ViewEditEcmStockDocOuts 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 ViewEditEcmStockDocOuts(){
|
||||
|
||||
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/EcmStockDocOuts/views/view.list.php
Executable file
252
modules/EcmStockDocOuts/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 EcmStockDocOutsViewList extends ViewList{
|
||||
|
||||
function EcmStockDocOutsViewList(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->module=$module = "EcmStockDocOuts";
|
||||
$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