init
This commit is contained in:
66
modules/EcmPrepaymentInvoices/DetailView.php
Normal file
66
modules/EcmPrepaymentInvoices/DetailView.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?
|
||||
error_reporting(LC_ALL);
|
||||
ini_set('display_errors', '1');
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
||||
|
||||
require_once('modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php');
|
||||
//require_once('modules/EcmPrepaymentInvoices/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
|
||||
if(isset($_REQUEST['record']))$focus->retrieve($_REQUEST['record']);
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmPrepaymentInvoices/views/DetailView/view.detail.php');
|
||||
|
||||
$detail = new EcmPrepaymentInvoicesViewDetail();
|
||||
|
||||
$detail->ss = new Sugar_Smarty();
|
||||
$detail->module = 'EcmPrepaymentInvoices';
|
||||
$detail->bean = $focus;
|
||||
$detail->tplFile = 'include/DetailView/DetailView.tpl';
|
||||
|
||||
$btn = '<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.open(\'index.php?module=EcmPrepaymentInvoices&action=createPDF&to_pdf=1&record=' . $_REQUEST ['record'] . '\',\'_blank\');" type="button" value="Pokaż PDF"></div>';
|
||||
$detail->ss->assign ( "CREATE_PDF", $btn );
|
||||
|
||||
//get other prepaymentinvoices info
|
||||
$res = $GLOBALS['db']->query("SELECT id, document_no, inv_value FROM ecmprepaymentinvoices WHERE ecmsale_id='".$focus->ecmsale_id."'");
|
||||
$total = 0;
|
||||
$other_inv = '';
|
||||
|
||||
while ($row = $GLOBALS['db']->fetchByAssoc($res)) {
|
||||
if ($row['id']==$focus->id) continue;
|
||||
$other_inv.='<a href="index.php?module=EcmPrepaymentInvoices&action=DetailView&record='.$row['id'].'">'.$row['document_no'].'</a> ';
|
||||
$total+=$row['inv_value'];
|
||||
}
|
||||
$detail->ss->assign('other_ecmprepaymentinvoices',$other_inv);
|
||||
$detail->ss->assign('other_ecmprepayment_invoices_sum',format_number($total));
|
||||
|
||||
|
||||
$scriptOpt = '<script language="javascript">
|
||||
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
|
||||
var N;
|
||||
|
||||
|
||||
</script>';
|
||||
echo $scriptOpt;
|
||||
$detail->preDisplay();
|
||||
$focus->parent_name_copy = $focus->parent_name;
|
||||
echo $detail->display();
|
||||
?>
|
||||
381
modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php
Normal file
381
modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php
Normal file
@@ -0,0 +1,381 @@
|
||||
<?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: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('data/SugarBean.php');
|
||||
require_once('include/utils.php');
|
||||
|
||||
class EcmPrepaymentInvoice extends SugarBean {
|
||||
var $field_name_map = array();
|
||||
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $name;
|
||||
var $inv_value;
|
||||
var $position_list;
|
||||
var $products_on_pdf;
|
||||
|
||||
var $module_dir = 'EcmPrepaymentInvoices';
|
||||
var $table_name = "ecmprepaymentinvoices";
|
||||
var $object_name = "EcmPrepaymentInvoice";
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
var $additional_column_fields = array('assigned_user_name', 'assigned_user_id');
|
||||
|
||||
function EcmPrepaymentInvoice() {
|
||||
parent::SugarBean();
|
||||
$this->setupCustomFields('EcmPrepaymentInvoices');
|
||||
foreach($this->field_defs as $field){
|
||||
$this->field_name_map[$field['name']] = $field;
|
||||
}
|
||||
}
|
||||
function get_summary_text(){
|
||||
return $this->name;
|
||||
}
|
||||
function create_list_query($order_by, $where, $show_deleted = 0){
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query ="SELECT ";
|
||||
$query.="ecmprepaymentinvoices.*,users.user_name as assigned_user_name";
|
||||
if($custom_join)$query.=$custom_join['select'];
|
||||
$query.=" FROM ecmprepaymentinvoices ";
|
||||
$query.="LEFT JOIN users ON ecmprepaymentinvoices.assigned_user_id=users.id";
|
||||
$query.=" ";
|
||||
if($custom_join)$query.=$custom_join['join'];
|
||||
$where_auto='1=1';
|
||||
if($show_deleted==0)$where_auto=" $this->table_name.deleted=0 ";
|
||||
elseif($show_deleted==1)$where_auto=" $this->table_name.deleted=1 ";
|
||||
if($where!="")$query.="where $where AND ".$where_auto;
|
||||
else $query.="where ".$where_auto;
|
||||
if(substr_count($order_by,'.')>0)$query .= " ORDER BY $order_by";
|
||||
elseif($order_by != "")$query .= " ORDER BY $order_by";
|
||||
else $query .= " ORDER BY ecmprepaymentinvoices.name";
|
||||
return $query;
|
||||
}
|
||||
function create_export_query($order_by,$where){
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query ="SELECT ";
|
||||
$query.="ecmprepaymentinvoices.*,users.user_name as assigned_user_name";
|
||||
if($custom_join)$query.=$custom_join['select'];
|
||||
$query.=" FROM ecmprepaymentinvoices ";
|
||||
$query.="LEFT JOIN users ON ecmprepaymentinvoices.assigned_user_id=users.id";
|
||||
$query.=" ";
|
||||
if($custom_join)$query.=$custom_join['join'];
|
||||
$where_auto='1=1';
|
||||
if($show_deleted==0)$where_auto=" $this->table_name.deleted=0 ";
|
||||
elseif($show_deleted==1)$where_auto=" $this->table_name.deleted=1 ";
|
||||
if($where!="")$query.="where $where AND ".$where_auto;
|
||||
else $query.="where ".$where_auto;
|
||||
if(substr_count($order_by,'.')>0)$query .= " ORDER BY $order_by";
|
||||
elseif($order_by != "")$query .= " ORDER BY $order_by";
|
||||
else $query .= " ORDER BY ecmprepaymentinvoices.name";
|
||||
return $query;
|
||||
}
|
||||
function fill_in_additional_list_fields(){
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields(){
|
||||
parent::fill_in_additional_detail_fields();
|
||||
}
|
||||
function get_list_view_data(){
|
||||
global $current_language;
|
||||
$the_array=parent::get_list_view_data();
|
||||
$app_list_strings=return_app_list_strings_language($current_language);
|
||||
$mod_strings=return_module_language($current_language,'EcmPrepaymentInvoices');
|
||||
|
||||
$the_array['NAME']=(($this->name == "") ? "<em>blank</em>" : $this->name);
|
||||
$the_array['ENCODED_NAME']=$this->name;
|
||||
$the_array['PDF']='<img border="0" src="modules/EcmSales/images/pdf.gif" title="Podglad Zam<61>wienia" onclick="EcmPreviewPDF(\'index.php?module=EcmPrepaymentInvoices&action=previewPDF&method=I&record='.$this->id.'&to_pdf=1\',{zoom:75,toolbar:1});" style="cursor:pointer">';
|
||||
return $the_array;
|
||||
}
|
||||
function build_generic_where_clause($the_query_string){
|
||||
$where_clauses=array();
|
||||
$the_query_string=PearDatabase::quote(from_html($the_query_string));
|
||||
array_push($where_clauses,"ecmprepaymentinvoices.name like '$the_query_string%'");
|
||||
|
||||
$the_where="";
|
||||
foreach($where_clauses as $clause){
|
||||
if($the_where!="")$the_where.=" or ";
|
||||
$the_where.=$clause;
|
||||
}
|
||||
return $the_where;
|
||||
}
|
||||
function set_notification_body($xtpl,$ecmprepaymentinvoice)
|
||||
{
|
||||
global $mod_strings,$app_list_strings;
|
||||
$xtpl->assign("ECMPREPAYMENTINVOICE_SUBJECT",$ecmprepaymentinvoice->name);
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function save($check_notify=FALSE){
|
||||
$return_id = parent::save($check_notify);
|
||||
return $return_id;
|
||||
}
|
||||
|
||||
|
||||
function setTemplate() {
|
||||
|
||||
if(!isset($this->template_id) || $this->template_id == '') return null;
|
||||
|
||||
if(isset($this->template)) return $this->template;
|
||||
|
||||
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
|
||||
$this->template = new EcmDocumentTemplate();
|
||||
|
||||
//$this->template->retrieve($this->template_id);
|
||||
$this->template->retrieve($this->template_id, true, false);
|
||||
|
||||
|
||||
if(isset($this->template->id) && $this->template->id != '') {
|
||||
|
||||
$this->template->format_all_fields();
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
$this->template = null;
|
||||
|
||||
|
||||
|
||||
return $this->template;
|
||||
|
||||
}
|
||||
|
||||
function generateNumber() {
|
||||
$this->setTemplate();
|
||||
$this->number = isset($this->template) ? $this->template->generateNumber($this->table_name) : '';
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
function formatNumber() {
|
||||
$this->setTemplate();
|
||||
$this->document_no = isset($this->template) ? $this->template->formatNumber($this->number, $this->module_dir) : '';
|
||||
$tmp = explode("/", $this->document_no);
|
||||
$this->document_no = "FV ".$tmp[0]."/P/".$tmp[1];
|
||||
return $this->document_no;
|
||||
}
|
||||
function formatDocumentNumber($documentNumber = '', $code = '') {
|
||||
return isset($this->template) ? $this->template->formatDocumentNumber($documentNumber, $code) : '';
|
||||
}
|
||||
function getPDF($id = null,$method = 'I',$name = null) {
|
||||
|
||||
global $sugar_config;
|
||||
|
||||
if($id != null) {
|
||||
|
||||
$this->retrieve($id);
|
||||
|
||||
if($this->id == '') return;
|
||||
|
||||
}
|
||||
|
||||
global $mod_strings;
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
if(isset($this->ecmlanguage) && $this->ecmlanguage != '') {
|
||||
$data = EcmText::LoadText(null,null,"EcmPrepaymentInvoices",$this->ecmlanguage);
|
||||
if(isset($data[0]) && isset($data[0]['data']) && isset($data[0]['data']['labels'])) {
|
||||
$data = $data[0]['data']['labels'];
|
||||
foreach($data as $key => $value) {
|
||||
$mod_strings[$value['label']] = $value['translation'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->format_all_fields();
|
||||
|
||||
$this->setTemplate();
|
||||
|
||||
|
||||
if(isset($this->template->id) && $this->template->id != '') {
|
||||
|
||||
$this->template->setPDF($this->template_id);
|
||||
$this->template->pdf->SetAutoPageBreak(true,40);
|
||||
$this->DrawMainPDF($this->template->pdf);
|
||||
|
||||
$this->template->outputPDF((($name) ? $name : $this->createPdfFileName()),$method);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function DrawMainPDF($pdf) {
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$arr=$this->template->getTemplateFile($_REQUEST['module']);
|
||||
|
||||
include_once("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/subheader.php");
|
||||
/*
|
||||
$pdf->SetFont('arialpl','','7');
|
||||
$this->DrawPositions($pdf);
|
||||
*/
|
||||
include_once("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/subfooter.php");
|
||||
}
|
||||
|
||||
function setUser() {
|
||||
if(is_object($this->user)) return $this->user;
|
||||
require_once('modules/Users/User.php');
|
||||
$us = new User();
|
||||
global $current_user;
|
||||
$us->retrieve(($this->assigned_user_id)?$this->assigned_user_id:$current_user->id);
|
||||
if(isset($us->id) && $us->id != '') {
|
||||
$this->user = $us;
|
||||
}
|
||||
else
|
||||
$this->user = null;
|
||||
return $this->user;
|
||||
}
|
||||
function createPdfFileName($format=true) {
|
||||
$arr1 = Array('\\', '/', ':', '*', '?' , '"', '<', '>', '|', ' ');
|
||||
$arr2 = Array('', '', '', '', '', '\'', '[', ']', '', '_');
|
||||
$tmp = $this->document_no;
|
||||
if($format) {
|
||||
$tmp = str_replace($arr1, $arr2, 'Invoice_'.$tmp.'.pdf');
|
||||
}
|
||||
else
|
||||
$tmp = 'InvoiceOut '.$tmp.'.pdf';
|
||||
return $tmp;
|
||||
|
||||
}
|
||||
|
||||
//manage positions
|
||||
function getPosition($position, $checked = false) {
|
||||
|
||||
if(!is_array($position)) return '';
|
||||
|
||||
global $timedate;
|
||||
global $db;
|
||||
|
||||
$r=$db->fetchByAssoc($db->query("select q.document_no,q.id from ecmquotes as q inner join ecmquoteitems as i on i.ecmquote_id=q.id where i.id='".$position['item_id']."'"));
|
||||
$rs=$db->fetchByAssoc($db->query("select sum(quantity) as q from ecmstockdocoutitems where item_id='".$position['id']."'"));
|
||||
|
||||
$pr=$db->fetchByAssoc($db->query("select unit_name from ecmproducts where id='".$position['ecmproduct_id']."'"));
|
||||
$return_array = array();
|
||||
$return_array['id'] = $position['ecmproduct_id'];
|
||||
//$return_array['ecmquote_id']=$r['id'];
|
||||
//$return_array['ecmquote_name']=$r['document_no'];
|
||||
|
||||
$return_array['iid'] = $position['id'];
|
||||
//$return_array['item_id'] = $position['item_id'];
|
||||
//$return_array['position'] = $position['position'];
|
||||
$return_array['code'] = $position['code'];
|
||||
$return_array['name'] = $position['name'];
|
||||
$return_array['quantity'] = $position['quantity'];
|
||||
|
||||
if ($checked) $return_array['checked'] = true;
|
||||
//$return_array['price'] = $position['price'];
|
||||
//$return_array['discount'] = $position['discount'];
|
||||
//$return_array['total'] = $position['total'];
|
||||
//$return_array['unit_id'] = $position['dd_unit_id'];
|
||||
//$return_array['unit_name'] = $pr['unit_name'];
|
||||
//$return_array['vat_id'] = $position['ecmvat_id'];
|
||||
//$return_array['vat_name'] = $position['ecmvat_name'];
|
||||
//$return_array['vat_value'] = $position['ecmvat_value'];
|
||||
//$return_array['category_id'] = $position['ecmproductcategory_id'];
|
||||
//$return_array['currency_id'] = $position['currency_id'];
|
||||
//$return_array['currency_name'] = $position['currency_name'];
|
||||
//$return_array['recipient_code'] = $position['recipient_code'];
|
||||
//$return_array['temp_item_id'] = $position['temp_item_id'];
|
||||
//$return_array['temp_date'] = $position['temp_date'];
|
||||
//$return_array['rq'] = $position['rq'];
|
||||
//if($rs['q']<$position['quantity'])$return_array['check']=$position['id'];
|
||||
//include_once("modules/EcmStockOperations/EcmStockOperation.php");
|
||||
//$op=new EcmStockOperation();
|
||||
//$return_array['stock']=$op->getStock($position['ecmproduct_id']);
|
||||
return $return_array;
|
||||
}
|
||||
|
||||
function getPositionListDetailView($sale_id, $array = false) {
|
||||
//get invoice products
|
||||
$inv_prod = explode("|", $this->products_on_pdf);
|
||||
$query = "SELECT * FROM `ecmsaleitems` WHERE id IN ('".implode("','", $inv_prod)."') order by position asc";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
|
||||
if($r) {
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
if (in_array($w['id'], $inv_prod)) $checked = true; else $checked = false;
|
||||
$return_array [] = $this->getPosition($w, $checked);
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function getPositionList($sale_id, $array = false) {
|
||||
//get invoice products
|
||||
$inv_prod = explode("|", $this->products_on_pdf);
|
||||
$query = "SELECT * FROM `ecmsaleitems` WHERE `ecmsale_id`='".$sale_id."' order by position asc";
|
||||
echo $query;
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
//return $query;
|
||||
if($r) {
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
if (in_array($w['id'], $inv_prod)) $checked = true; else $checked = false;
|
||||
$return_array [] = $this->getPosition($w, $checked);
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
}
|
||||
243
modules/EcmPrepaymentInvoices/EcmPrepaymentInvoices.js
Normal file
243
modules/EcmPrepaymentInvoices/EcmPrepaymentInvoices.js
Normal file
@@ -0,0 +1,243 @@
|
||||
function doRequest(where, post, doFunction, error) {
|
||||
this.Display = function (result) { doFunction(result.responseText); }
|
||||
this.Fail = function (result) { if (error) alert(error); }
|
||||
YAHOO.util.Connect.asyncRequest('POST', where, { success: this.Display, failure: this.Fail }, post);
|
||||
}
|
||||
function generateNumber() {
|
||||
if (document.getElementById('template_id').value == '') { alert('There are no DocumentTemplates in data base!'); return; }
|
||||
doRequest(
|
||||
'index.php',
|
||||
'to_pdf=1&generate=1&module=EcmPrepaymentInvoices&action=generateNumber&template_id=' + document.getElementById('template_id').value + '&record=' + document.forms.EditView.record.value,
|
||||
function (result) {
|
||||
var arr = eval(result)[0];
|
||||
document.getElementById('number').value = arr.number;
|
||||
document.getElementById('document_no').value = arr.document_no;
|
||||
},
|
||||
''
|
||||
);
|
||||
};
|
||||
|
||||
function addEvent(object, eventName, do_function) {
|
||||
if (typeof (object) == "string") object = document.getElementById(object);
|
||||
if (!object) { alert('No object in function addEvent!'); return; }
|
||||
if (object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on' + eventName, do_function);
|
||||
}
|
||||
}
|
||||
function changer() {
|
||||
this.list = new Object();
|
||||
this.add = function (object, type, do_function, start_value) {
|
||||
if (typeof (object) == "string") object = document.getElementById(object);
|
||||
if (!object) return;
|
||||
this.list[object.id] = new Object();
|
||||
this.list[object.id].object = object;
|
||||
this.list[object.id].type = type;
|
||||
this.list[object.id].do_function = do_function;
|
||||
this.list[object.id].start_value = start_value;
|
||||
this.list[object.id].value = '';
|
||||
}
|
||||
this.getValue = function (element) {
|
||||
var value = null;
|
||||
if (element.object) {
|
||||
if (element.type == "innerHTML") value = element.object.innerHTML;
|
||||
if (element.type == "value") value = element.object.value;
|
||||
if (element.type == "checked") value = element.object.checked;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
this.interval = 1000;
|
||||
this.timer = null;
|
||||
this.startTimer = function () {
|
||||
var cc = this;
|
||||
this.timer = setInterval(
|
||||
function () {
|
||||
var list = cc.list;
|
||||
for (x in list) {
|
||||
if (list[x].start_value) {
|
||||
list[x].value = cc.getValue(list[x]);
|
||||
list[x].start_value = false;
|
||||
}
|
||||
else {
|
||||
var value = cc.getValue(list[x]);
|
||||
if (list[x].value !== value)
|
||||
if (list[x].do_function)
|
||||
list[x].do_function(list[x].object);
|
||||
list[x].value = value;
|
||||
}
|
||||
}
|
||||
},
|
||||
this.interval
|
||||
);
|
||||
}
|
||||
this.stopTimer = function () {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
|
||||
function ShowLoadingView() {
|
||||
var slv = document.getElementById('ShowLoadingView');
|
||||
if (!slv) {
|
||||
slv = document.createElement('div');
|
||||
slv.id = 'ShowLoadingView';
|
||||
slv.className = 'transparent_class_loading';
|
||||
slv.style.width = '100%';
|
||||
slv.style.height = '500%';
|
||||
|
||||
var sli = document.createElement('img');
|
||||
sli.className = 'transparent_class_loading_image';
|
||||
sli.src = 'themes/default/images/loading.gif';
|
||||
slv.appendChild(sli);
|
||||
|
||||
document.body.appendChild(slv);
|
||||
}
|
||||
slv.style.display = '';
|
||||
}
|
||||
|
||||
function HideLoadingView() {
|
||||
var slv = document.getElementById('ShowLoadingView');
|
||||
if (slv) slv.style.display = 'none';
|
||||
}
|
||||
|
||||
|
||||
function SaveForm() {
|
||||
ShowLoadingView();
|
||||
setTimeout(function () {
|
||||
if (OPT['checkbox_demo'] == 1 && document.forms.EditView.record.value == '') { alert(MOD.LBL_DEMO_VERSION_INFORMATION); return; }
|
||||
ERROR = false;
|
||||
if (ERROR) { alert(MOD['LBL_SAVE_FORM_ERROR']); HideLoadingView(); return false; }
|
||||
document.forms.EditView.action.value = 'Save';
|
||||
|
||||
if (check_form('EditView')) {
|
||||
doRequest('index.php', getFormPost('Save'), function (result) {
|
||||
document.forms.EditView.record.value = result.substring(result.length - 36);
|
||||
alert(MOD['LBL_SAVED']);
|
||||
window.onbeforeunload = '';
|
||||
if (OPT['setEmailTab']) setEMAIL(true); else window.location = 'index.php?module=' + document.forms.EditView.module.value + '&action=DetailView&record=' + document.forms.EditView.record.value;
|
||||
HideLoadingView();
|
||||
},
|
||||
MOD['LBL_NOT_SAVED']
|
||||
);
|
||||
} else { alert(MOD['LBL_NOT_SAVED']); HideLoadingView(); return false; }
|
||||
}, 200);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function getFormPost(action) {
|
||||
if (!action) action = 'previewPDF';
|
||||
var pd = 'to_pdf=1' + '&module=EcmPrepaymentInvoices&action=' + action + '&record=' + document.forms.EditView.record.value;
|
||||
pd += '&cache=fromJava';
|
||||
//alert(pd);
|
||||
var record = document.forms.EditView.record.value;
|
||||
var pd2 = new Object();
|
||||
|
||||
pd2['module'] = 'EcmPrepaymentinvoices';
|
||||
pd2['action'] = action;
|
||||
pd2['record'] = document.forms.EditView.record.value;
|
||||
pd2['to_pdf'] = '1';
|
||||
pd2['cache'] = 'fromJava';
|
||||
|
||||
document.forms["EditView"].action.value = action;
|
||||
var tmp;
|
||||
for (var i = 0; i < document.forms["EditView"].elements.length; i++) {
|
||||
tmp = document.forms["EditView"].elements[i];
|
||||
if (tmp.name != '') {
|
||||
if (tmp.type == "checkbox")
|
||||
pd2[document.forms["EditView"].elements[i].name] = (document.forms["EditView"].elements[i].checked ? '1' : '0');
|
||||
else
|
||||
pd2[document.forms["EditView"].elements[i].name] = document.forms["EditView"].elements[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(pd2);
|
||||
|
||||
pd += '&otherFormData=' + JSON.stringifyNoSecurity(pd2);
|
||||
|
||||
return pd;
|
||||
}
|
||||
|
||||
/*
|
||||
function sendFormPostToPdf() {
|
||||
ERROR = false;
|
||||
if (ERROR) { alert('There are some errors on list'); return false; }
|
||||
doRequest("index.php", getFormPost(), function (result) {
|
||||
if (SHOW_PDF_IN_DIV == 1) {
|
||||
HideLoadingView();
|
||||
//SetTab('PREVIEW');
|
||||
EcmPreviewPDF('index.php?module=EcmInvoiceOuts&action=previewPDF&to_pdf=1&from=EcmInvoiceOuts', { zoom: 75 });
|
||||
}
|
||||
else {
|
||||
SetTab('PREVIEW');
|
||||
document.getElementById('previewPDF').innerHTML = "<iframe style='border:none;width:100%;height:1200px;' frameborder='no' src='index.php?module=EcmInvoiceOuts&action=previewPDF&to_pdf=1&from=EcmInvoiceOuts#zoom=75'>Yours browser not accept iframes!</iframe>";
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function canConfirm() {
|
||||
if (document.forms.EditView.status.value == "accepted" && !OPT.user.confirm_receipts) {
|
||||
alert('This option is disabled for You.');
|
||||
document.forms.EditView.status.value = ((OPT.old_status) ? OPT.old_status : '');
|
||||
}
|
||||
OPT.old_status = document.forms.EditView.status.value;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function () {
|
||||
|
||||
if (document.getElementById("isSale").value == true) {
|
||||
generateNumber();
|
||||
}
|
||||
|
||||
//initialize table
|
||||
|
||||
var CHANGER = new changer();
|
||||
CHANGER.interval = 500;
|
||||
|
||||
/*
|
||||
function setToAddrEmail(str) {
|
||||
if (str && str != '') str = eval(str); else str = '';
|
||||
if (typeof (str) == "object") str = str[0]; else str = '';
|
||||
//= document.getElementById('to_addrs_field'); if(tmp) tmp.value = (str=='')?'':(((str.name)?str.name:'')+' <'+((str.email1)?str.email1:'')+'>; ');
|
||||
tmp = document.getElementById('parent_address_street'); if (tmp) tmp.value = (str.billing_address_street) ? str.billing_address_street : '';
|
||||
tmp = document.getElementById('parent_address_city'); if (tmp) tmp.value = (str.billing_address_city) ? str.billing_address_city : '';
|
||||
tmp = document.getElementById('parent_address_postalcode'); if (tmp) tmp.value = (str.billing_address_postalcode) ? str.billing_address_postalcode : '';
|
||||
tmp = document.getElementById('parent_address_country'); if (tmp) tmp.value = (str.billing_address_country) ? str.billing_address_country : '';
|
||||
// tmp = document.getElementById('to_nip'); if(tmp) tmp.value = (str.sic_code)?str.sic_code:'';
|
||||
tmp = document.getElementById('to_nip'); if (tmp) tmp.value = (str.vatid) ? str.vatid : '';
|
||||
tmp = document.getElementById('to_nip'); if (tmp) tmp.value = (str.sic_code) ? str.sic_code : '';
|
||||
tmp = document.getElementById('ecmlanguage'); if (tmp && str.ecmlanguage) { if (tmp.value != str.ecmlanguage) { tmp.value = str.ecmlanguage; setTexts(); } }
|
||||
tmp = document.getElementById('currency_id'); if (tmp) tmp.value = (str.currency_id) ? str.currency_id : '';
|
||||
tmp = document.getElementById('ecmpaymentcondition_id'); if (tmp) tmp.value = (str.ecmpaymentcondition_id) ? str.ecmpaymentcondition_id : '';
|
||||
tmp = document.getElementById('ecmpaymentcondition_name'); if (tmp) tmp.value = (str.ecmpaymentcondition_name) ? str.ecmpaymentcondition_name : '';
|
||||
}
|
||||
*/
|
||||
generateNumber();
|
||||
function ParentIdChange(obj) {
|
||||
var list = '';
|
||||
list = 'gdModule=Accounts&gdData=sic_code|name|email1|billing_address_street|billing_address_city|billing_address_postalcode|billing_address_country|sic_code|sic_code|vatid|is_vat_free|ecmlanguage|currency_id|ecmpaymentcondition_name|ecmpaymentcondition_id|supplier_code';
|
||||
if (obj.value == '') setToAddrEmail(''); else doRequest('index.php', 'module=EcmInvoiceOuts&action=getData&' + list + '&gdId=' + obj.value + '&to_pdf=1', setToAddrEmail);
|
||||
}
|
||||
|
||||
CHANGER.add('parent_id', 'value', ParentIdChange, true);
|
||||
|
||||
document.getElementById('description').rows = 1;
|
||||
|
||||
document.getElementById('template_name').value = document.getElementById('template_id').options[document.getElementById('template_id').selectedIndex].text;
|
||||
document.getElementById('ecmvat_name').value = document.getElementById('ecmvat_id').options[document.getElementById('ecmvat_id').selectedIndex].text;
|
||||
|
||||
CHANGER.startTimer();
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
function addEvent(object, eventName, do_function) {
|
||||
|
||||
if (typeof (object) == "string") object = document.getElementById(object);
|
||||
|
||||
if (!object) { alert('No object in function addEvent!'); return; }
|
||||
|
||||
if (object.addEventListener) {
|
||||
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
|
||||
} else {
|
||||
|
||||
object.attachEvent('on' + eventName, do_function);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
addEvent(
|
||||
|
||||
window,
|
||||
|
||||
'load',
|
||||
|
||||
function () {
|
||||
|
||||
function HideLoadingView() {
|
||||
var slv = document.getElementById('ShowLoadingView');
|
||||
if (slv) slv.style.display = 'none';
|
||||
}
|
||||
setPREVIEW = function () {
|
||||
SetTab('panel_PREVIEW');
|
||||
document.getElementById('previewPDF').innerHTML = '<iframe style="border:none;width:100%;height:1200px;" frameborder="no" src="index.php?module=EcmPrepaymentInvoices&action=previewPDF&to_pdf=1&method=I&record=' + document.forms.DetailView.record.value + '#zoom=75">Yours browser not accept iframes!</iframe>';
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,73 @@
|
||||
<?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/EditView/QuickCreate.php');
|
||||
require_once('modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php');
|
||||
require_once('include/javascript/javascript.php');
|
||||
|
||||
class EcmPrepaymentInvoicesQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'EcmPrepaymentInvoices');
|
||||
|
||||
parent::process();
|
||||
|
||||
$this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['ecmprepaymentinvoice_priority_dom'], $app_list_strings['ecmprepaymentinvoice_priority_default_key']));
|
||||
$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['ecmprepaymentinvoice_status_dom'], $app_list_strings['ecmprepaymentinvoice_status_default_key']));
|
||||
$this->ss->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['ecmprepaymentinvoice_type_dom'],$app_list_strings['ecmprepaymentinvoice_type_default_key']));
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"ecmprepaymentinvoicesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"ecmprepaymentinvoices\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_ecmprepaymentinvoices\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('ecmprepaymentinvoicesQuickCreate');
|
||||
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
128
modules/EcmPrepaymentInvoices/EditView.php
Normal file
128
modules/EcmPrepaymentInvoices/EditView.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
error_reporting(LC_ALL);
|
||||
ini_set('display_errors',1);
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings, $db, $timedate;
|
||||
|
||||
|
||||
require_once('modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php');
|
||||
//require_once('modules/EcmPrepaymentInvoices/Forms.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
$json = getJSONobj();
|
||||
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
|
||||
$OPT = array();
|
||||
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4;
|
||||
$OPT['quick_product_item_adding'] = $cc['quick_product_item_adding'];
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmPrepaymentInvoices/views/EditView/view.edit.php');
|
||||
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
|
||||
$cur = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select value from currency_nbp_archive where date<'".$focus->register_date."' and currency_id='".$focus->currency_id."' order by date desc limit 0,1;"));
|
||||
|
||||
if ($cur['value'])
|
||||
$focus->currency_value_nbp = $cur['value'];
|
||||
|
||||
$edit = new EcmPrepaymentInvoicesViewEdit();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->module = 'EcmPrepaymentInvoices';
|
||||
|
||||
if($_REQUEST['ecmsale_id']){
|
||||
$OPT['new_number'] = true;
|
||||
$arr=array("parent_contact_name","currency_id","template_id","parent_id","parent_name","parent_address_street","parent_address_postalcode","parent_address_city","parent_address_country","total");
|
||||
include_once("modules/EcmSales/EcmSale.php");
|
||||
$sale=new EcmSale();
|
||||
$sale->retrieve($_REQUEST['ecmsale_id']);
|
||||
foreach($arr as $a)$focus->$a=$sale->$a;
|
||||
$focus->description="Przedpłata do proformy za ".$sale->document_no;
|
||||
$focus->register_date=$timedate->to_display_date(date("Y-m-d"));
|
||||
$focus->payment_date=$timedate->to_display_date(date("Y-m-d"));
|
||||
$focus->currency_value = $sale->currency_value;
|
||||
// search for old prepaymentinvoices
|
||||
$old_sum = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(inv_value) as sum from ecmprepaymentinvoices where ecmsale_id='".$_REQUEST['ecmsale_id']."';"));
|
||||
$focus->ecmsale_id = $_REQUEST['ecmsale_id'];
|
||||
$focus->inv_value = ($sale->total_brutto - $old_sum['sum'])."";
|
||||
$focus->ecmpaymentcondition_id = "ec14f1da-09c5-7b99-77ef-4e9fd3cfd67f";
|
||||
$focus->ecmpaymentcondition_name = "Przedpłata";
|
||||
$focus->parent_name_copy = $focus->parent_name;
|
||||
$focus->to_vatid=$sale->parent_nip;
|
||||
$focus->last_parent_id = $focus->parent_id;
|
||||
$edit->ss->assign("isSale", true);
|
||||
} else if ($_REQUEST['record']) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
$sale=new EcmSale();
|
||||
$sale->retrieve($focus->ecmsale_id);
|
||||
$focus->last_parent_id = $focus->parent_id;
|
||||
$focus->parent_name_copy = $focus->parent_name;
|
||||
}
|
||||
|
||||
$edit->bean = $focus;
|
||||
|
||||
$tt="";
|
||||
$w=$GLOBALS[db]->query("select name,id,deleted,date_modified from ecmdocumenttemplates where deleted='0' or id='".$focus->template_id."'");
|
||||
while($r=$GLOBALS[db]->fetchByAssoc($w)){
|
||||
if($r['deleted']==1 && $_REQUEST['record'] && $focus->template_id){
|
||||
$tt.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$focus->template_id)$tt.=' selected';
|
||||
$tt.='>'.$r['name'].' till '.$r['date_modified'].'</option>';
|
||||
}
|
||||
elseif($r['deleted']==0){
|
||||
$tt.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$focus->template_id)$tt.=' selected';
|
||||
$tt.='>'.$r['name'].'</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$edit->ss->assign("DOCUMENT_TEMPLATES_OPTIONS", $tt);
|
||||
|
||||
$tt="";
|
||||
$w=$GLOBALS[db]->query("select name,id,value from ecmvats where deleted='0' order by name");
|
||||
while($r=$GLOBALS[db]->fetchByAssoc($w)){
|
||||
$tt.='<option value="'.$r['id'].'"';
|
||||
if($r['value']==23)$tt.=' selected';
|
||||
$tt.='>'.$r['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("ECMVATS_OPTIONS", $tt);
|
||||
$edit->ss->assign("ecmsale_id", $focus->ecmsale_id);
|
||||
$edit->ss->assign("ecmsale_name", $sale->document_no);
|
||||
|
||||
|
||||
//$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
$edit->tplFile = 'include/EditView/EditView.tpl';
|
||||
|
||||
|
||||
|
||||
$scriptOpt = '<script language="javascript">
|
||||
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
|
||||
var N;
|
||||
|
||||
|
||||
</script>';
|
||||
echo $scriptOpt;
|
||||
$edit->preDisplay();
|
||||
|
||||
|
||||
echo $edit->display();
|
||||
//echo '<div id="subpanels">';
|
||||
//require_once('subpanels.php');
|
||||
//echo '</div>';
|
||||
?>
|
||||
37
modules/EcmPrepaymentInvoices/Forms.php
Normal file
37
modules/EcmPrepaymentInvoices/Forms.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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/EditView/SideQuickCreate.php');
|
||||
50
modules/EcmPrepaymentInvoices/Menu.php
Normal file
50
modules/EcmPrepaymentInvoices/Menu.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
if(ACLController::checkAccess('EcmPrepaymentInvoices', 'list', true))
|
||||
$module_menu[]=array("index.php?module=EcmPrepaymentInvoices&action=index&return_module=EcmPrepaymentInvoices&return_action=DetailView", "Lista faktur zaliczkowych","EcmPrepaymentInvoices", 'EcmPrepaymentInvoices');
|
||||
if(ACLController::checkAccess('EcmPrepaymentInvoices','list', true)) $module_menu[]=array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
|
||||
?>
|
||||
39
modules/EcmPrepaymentInvoices/PDFTemplate/helper.php
Normal file
39
modules/EcmPrepaymentInvoices/PDFTemplate/helper.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
function formatPDFPositions($positions, $focus) {
|
||||
$result = array();
|
||||
|
||||
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
$pos['quantity'] = intval($pos['quantity']);
|
||||
/*
|
||||
$pos['old_quantity'] = intval($pos['old_quantity']);
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
$pos['price_netto']=format_number($pos['price_netto']);
|
||||
$pos['total_vat']=format_number($pos['total_vat']);
|
||||
$pos['ecmvat_value']=format_number($pos['ecmvat_value']);
|
||||
$pos['total_brutto']=format_number($pos['total_brutto']);
|
||||
$pos['total_netto']=format_number($pos['total_netto']);
|
||||
$pos['old_total_netto']=format_number($pos['old_total_netto']);
|
||||
$pos['old_total_brutto']=format_number($pos['old_total_brutto']);
|
||||
$pos['old_total_vat']=format_number($pos['old_total_vat']);
|
||||
$pos['old_price_netto']=format_number($pos['old_price_netto']);
|
||||
*/
|
||||
$result[] = $pos;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function mysql_escape_gpc($dirty)
|
||||
{
|
||||
if (ini_get('magic_quotes_gpc'))
|
||||
{
|
||||
return $dirty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return mysql_real_escape_string($dirty);
|
||||
}
|
||||
}
|
||||
383
modules/EcmPrepaymentInvoices/PDFTemplate/tpl/content.php
Normal file
383
modules/EcmPrepaymentInvoices/PDFTemplate/tpl/content.php
Normal file
@@ -0,0 +1,383 @@
|
||||
<?php
|
||||
$w = "35"; // first column width
|
||||
$w3 = "35";
|
||||
$w2 = "25"; // second column width
|
||||
|
||||
|
||||
|
||||
|
||||
$content = '
|
||||
<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->parent_shipping_address_name != '') {
|
||||
$content .= '<b>' . $labels['LBL_PDF_CONTENT_DELIVERY'] . '</b>';
|
||||
}
|
||||
|
||||
$content .= '</td>
|
||||
<td style="width: ' . $w2 . '%">';
|
||||
if ($focus->parent_payer_address_name != '') {
|
||||
$content .= '<b>' . $labels['LBL_PDF_CONTENT_PAYER'] . '</b>';
|
||||
}
|
||||
$content .= '</td>
|
||||
<td style="text-align: right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
' . $focus->parent_name . '
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
' . $focus->parent_shipping_address_name . '
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">' . $focus->parent_payer_address_name . '</td>
|
||||
<td style="text-align: right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: ' . $w . '%">
|
||||
' . $focus->parent_address_street . '
|
||||
</td>
|
||||
<td style="width: ' . $w3 . '%">
|
||||
' . $focus->parent_shipping_address_street . '
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
' . $focus->parent_payer_address_street . '
|
||||
</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->parent_shipping_address_postalcode . ' ' . $focus->parent_shipping_address_city;
|
||||
if (!is_null($focus->parent_shipping_address_country) & $focus->parent_shipping_address_country != '')
|
||||
$content .= ', ' . $focus->parent_shipping_address_country;
|
||||
$content .= '
|
||||
</td>
|
||||
<td style="width: ' . $w2 . '%">
|
||||
' . $focus->parent_payer_address_postalcode . ' ' . $focus->parent_payer_address_city;
|
||||
if (!is_null($focus->parent_payer_address_country) & $focus->parent_payer_address_country != '')
|
||||
$content .= ', ' . $focus->parent_payer_address_country;
|
||||
$content .= '
|
||||
</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 .= 'ILN: ' . $focus->parent_iln;
|
||||
}
|
||||
$content .= '
|
||||
</td>';
|
||||
$content .= '
|
||||
<td valign="top" style="width: ' . $w3 . '%">';
|
||||
if (!is_null($focus->parent_shipping_address_nip) && $focus->parent_shipping_address_nip) {
|
||||
$content .= $labels['LBL_PDF_CONTENT_NIP'] . ' ' . $focus->parent_shipping_address_nip;
|
||||
$nip = true;
|
||||
}
|
||||
if (!is_null($focus->parent_shipping_iln) && $focus->parent_shipping_iln) {
|
||||
if ($nip) $content .= '<br>';
|
||||
$nip = false;
|
||||
$content .= 'ILN: ' . $focus->parent_shipping_iln;
|
||||
}
|
||||
$content .= '
|
||||
</td>';
|
||||
$content .= '
|
||||
<td valign="top" style="width: ' . $w3 . '%">';
|
||||
if (!is_null($focus->parent_payer_address_nip) && $focus->parent_payer_address_nip) {
|
||||
$content .= $labels['LBL_PDF_CONTENT_NIP'] . ' ' . $focus->parent_payer_address_nip;
|
||||
$nip = true;
|
||||
}
|
||||
if (!is_null($focus->parent_payer_iln) && $focus->parent_payer_iln) {
|
||||
if ($nip) $content .= '<br>';
|
||||
$nip = false;
|
||||
$content .= 'ILN: ' . $focus->parent_payer_iln;
|
||||
}
|
||||
$content .= '</td>
|
||||
<td colspan="0" valign="top" style="text-align: right">
|
||||
|
||||
</td>
|
||||
</tr>';
|
||||
$content .= '
|
||||
</table>
|
||||
';
|
||||
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:left;vertical-align:top;">
|
||||
<tr><td width="18%" >' . $labels['LBL_PDF_CONTENT_REGISTER_DATE'] . '</td>
|
||||
<td style="text-align: left;" width="35%"><b>' . $focus->register_date . '</b></td>
|
||||
<td rowspan="2" style="text-align: left;vertical-align:top;">';
|
||||
|
||||
if ($focus->order_no != '') {
|
||||
$content .= $labels['LBL_PDF_CONTENT_PARENT_DOCUMENT_NO'] . ':<br>';
|
||||
}
|
||||
if ($focus->supplier_code != '') {
|
||||
$content .= $labels['LBL_SUPPLIER_CODE'] . ':<br>';
|
||||
}
|
||||
if ($focus->payment_date != '') {
|
||||
$content .= $labels['LBL_PAYMENT_DATE_PDF'] . ':<br>';
|
||||
}
|
||||
$pay = new EcmPaymentCondition();
|
||||
|
||||
$pay->retrieve($focus->ecmpaymentcondition_id);
|
||||
|
||||
$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->supplier_code != '') {
|
||||
$content .= '<b>' . $focus->supplier_code . '</b><br>';
|
||||
}
|
||||
if ($focus->payment_date != '') {
|
||||
$content .= '<b>' . date('d.m.Y', strtotime($focus->payment_date)) . '</b><br>';
|
||||
}
|
||||
$content .= '</td></tr></table><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'
|
||||
);
|
||||
if ($recipient_code == 1) {
|
||||
$columns['recipient_code'] = array(
|
||||
'field' => array(
|
||||
'recipient_code'
|
||||
),
|
||||
'label' => 'Kod Tow.',
|
||||
'align' => 'center'
|
||||
);
|
||||
}
|
||||
$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';
|
||||
if ($recipient_code == 1) {
|
||||
$columns['recipient_code']['width'] = '10';
|
||||
}
|
||||
$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';
|
||||
|
||||
$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>
|
||||
<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>
|
||||
';
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 23%;text-align: center;">
|
||||
' . $positions[0]['ecmvat_name'] . '
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: right;">
|
||||
' . $positions[0]['total_netto'] . '
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 25%;text-align: right;">
|
||||
' . $positions[0]['total_vat'] . '
|
||||
</td>
|
||||
<td style="font-size: 7pt; border: 0.5 solid black; width: 27%;text-align: right;">
|
||||
' . $positions[0]['total_brutto'] . '
|
||||
</td></tr>';
|
||||
// totals
|
||||
$content .= '
|
||||
<tr>
|
||||
<td style="font-size: 6.5pt; border: 0.5 solid black; width: 23%;text-align: center;background-color: #E9E9E9;">
|
||||
<b>Razem</b>
|
||||
</td>
|
||||
<td style="font-size: 6.5pt; border: 0.5 solid black; width: 25%;text-align: right;background-color: #E9E9E9;">
|
||||
<b>' . $positions[0]['total_netto'] . '</b>
|
||||
</td>
|
||||
<td style="font-size: 6.5pt; border: 0.5 solid black; width: 25%;text-align: right;background-color: #E9E9E9;">
|
||||
<b>' . $positions[0]['total_vat'] . '</b>
|
||||
</td>
|
||||
<td style="font-size: 6.5pt; border: 0.5 solid black; width: 27%;text-align: right;background-color: #E9E9E9;">
|
||||
<b>' . $positions[0]['total_brutto'] . '</b>
|
||||
</td></tr>';
|
||||
$content .= '
|
||||
</table>
|
||||
<table style="font-size: 7pt;">
|
||||
<tr><td>' . $labels['LBL_PDF_TO_PAY'] . '</td><td style="text-align: right;"><b>' . format_number($focus->inv_value) . ' ' . $symbol . '</b></td><td></td></tr>';
|
||||
$content .= '<tr><td>Zapłacono przelewem:</td><td style="text-align: right;"><b>' . format_number($focus->inv_value) . ' ' . $symbol . '</b></td><td style="text-align:left;">' . $paid_text . '</td></tr>
|
||||
</table>';
|
||||
$content .='<br><p style="font-size: 7pt;">Dane dotyczące zamówienia <b>'.$sale->document_no.'</b>. Numer zamówienia klienta: <b>'.$sale->parent_document_no.'</b>.</p>';
|
||||
|
||||
$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 ($sale_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>
|
||||
';
|
||||
$content .='<p style="font-size: 7pt;">Razem brutto: <b>'.format_number($sale->total_brutto).' '.$symbol.'</b></p>';
|
||||
$content .= '<br><br><p style="font-size: 7pt;">' . $labels['LBL_PDF_CONTENT_ISSUED_BY'] . ' <b>' . $user->full_name . '</b></p>
|
||||
<br><br>
|
||||
' . $focus->pdf_text . '
|
||||
';
|
||||
93
modules/EcmPrepaymentInvoices/PDFTemplate/tpl/footer.php
Normal file
93
modules/EcmPrepaymentInvoices/PDFTemplate/tpl/footer.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
$w = "62"; //first column width
|
||||
$w2 = "12"; //second column width
|
||||
//get bank information
|
||||
$a = new Account();
|
||||
$a->retrieve($focus->parent_id);
|
||||
|
||||
$ba_number = '35 1160 2202 0000 0000 6408 0411';
|
||||
$ba_name = 'BANK MILLENIUM';
|
||||
|
||||
unset($a);
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
e5 Polska Sp. z o.o
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_KRS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
28207
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
ul. Wąwozowa 11
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_NIP'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
PL525273990
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
02-796 Warszawa
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_REGON'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
016280234
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Tel: +48 (22) 228 20 90
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
'.$ba_name.'
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Fax: +48 (56) 674 60 47
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK_ACCOUNT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
'.$ba_number.'
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
'.$user->email1.'
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_GIOS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
E0006254W
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: 50%;">
|
||||
{PAGENO}/{nb}
|
||||
</td>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<b>'.$focus->document_no.'</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
21
modules/EcmPrepaymentInvoices/PDFTemplate/tpl/header.php
Normal file
21
modules/EcmPrepaymentInvoices/PDFTemplate/tpl/header.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
$header = '
|
||||
<table style="font-size: 8pt; width: 100%"><tr>
|
||||
<td width="15%" style="text-align: left; vertical-align: top;">
|
||||
<b>SPRZEDAWCA</b><br />
|
||||
e5 Polska Sp. z o. o.<br />
|
||||
ul. Wąwozowa 11<br />
|
||||
02-796 Warszawa<br />
|
||||
NIP: 5252173990<br>
|
||||
BDO: 000036962
|
||||
</td>
|
||||
<td style="text-align: center; vertical-align: middle;">
|
||||
<p style="text-align: center;font-size: 12pt;"><b>Faktura nr ' . $focus->document_no . '</b></p>
|
||||
<p style="text-align: center;">Przedpłatowa</p>
|
||||
</td>
|
||||
<td width="15%">
|
||||
<img style="width: 70px;" src="modules/EcmDocumentTemplates/files/13899e0f-321c-229a-aa3e-48be4a1532c1.png"/>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
';
|
||||
109
modules/EcmPrepaymentInvoices/Save.php
Normal file
109
modules/EcmPrepaymentInvoices/Save.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$json = getJSONobj();
|
||||
$pll = array(); $i=0; while(isset($_POST['p_'.$i])) { $pll[] = $json->decode(htmlspecialchars_decode($_POST['p_'.$i])); $_POST['p_'.$i] = ''; $i++;}
|
||||
$_POST = $json->decode(htmlspecialchars_decode($_POST['otherFormData']));
|
||||
$_POST['position_list'] = $pll;
|
||||
|
||||
$pop=array(); //products_on_pdf
|
||||
foreach ($pll as $v) {
|
||||
$pop[] = $v['iid'];
|
||||
}
|
||||
|
||||
$_REQUEST = $_POST;
|
||||
require_once("modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php");
|
||||
require_once('include/formbase.php');
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
if(isset($_POST['record']) && $_POST['record'] != '') {
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
//$focus->id = $_POST['record'];
|
||||
}
|
||||
|
||||
$focus->products_on_pdf = implode("|", $pop);
|
||||
|
||||
|
||||
if(isset($focus->id) && $focus->id != ''){
|
||||
$_POST['email_id'] = $focus->email_id;
|
||||
} else {
|
||||
$new_invoice = true;
|
||||
}
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
$check_notify = FALSE;
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$r = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT value FROM ecmvats WHERE id='".$focus->ecmvat_id."'"));
|
||||
$focus->ecmvat_value=floatval($r['value']);
|
||||
|
||||
$focus->save($check_notify);
|
||||
|
||||
$return_id = $focus->id;
|
||||
|
||||
echo $return_id; die();
|
||||
|
||||
?>
|
||||
72
modules/EcmPrepaymentInvoices/createPDF.php
Normal file
72
modules/EcmPrepaymentInvoices/createPDF.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
//ini_set('display_errors', '1');
|
||||
//ini_set('display_startup_errors', '1');
|
||||
//error_reporting(E_ALL);
|
||||
|
||||
if (!$_REQUEST['record'] || $_REQUEST['record'] == '')
|
||||
die('Brak rekordu');
|
||||
else
|
||||
$record = $_REQUEST['record'];
|
||||
|
||||
include_once("modules/EcmPrepaymentInvoices/PDFTemplate/helper.php");
|
||||
include_once("modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php");
|
||||
include_once("modules/EcmSales/EcmSale.php");
|
||||
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
$focus->retrieve($record);
|
||||
|
||||
$user = new User();
|
||||
$user->retrieve($focus->assigned_user_id);
|
||||
$labels = return_module_language($focus->ecmlanguage, 'EcmPrepaymentInvoices');
|
||||
include_once("include/MPDF57/mpdf.php");
|
||||
$p = new mPDF('', 'A4', null, 'helvetica', 10, 10, 30, 45, 5, 5);
|
||||
$mpdf->mirrorMargins = 1;
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$header = '';
|
||||
$footer = '';
|
||||
$content = '';
|
||||
|
||||
$positions = array();
|
||||
$positions[0]['position'] = "1";
|
||||
$positions[0]['name'] = $focus->description;
|
||||
$positions[0]['unit_name'] = "szt.";
|
||||
$positions[0]['quantity'] = "1";
|
||||
$positions[0]['ecmvat_name'] = $focus->ecmvat_name;
|
||||
$positions[0]['total_brutto'] = format_number($focus->inv_value);
|
||||
$netto = $focus->inv_value * 100 / (100 + $focus->ecmvat_value);
|
||||
$positions[0]['total_netto'] = format_number($netto);
|
||||
$positions[0]['price_netto'] = format_number($netto);
|
||||
$vat = $focus->inv_value - $netto;
|
||||
$positions[0]['total_vat'] = format_number($vat);
|
||||
|
||||
$sale = new EcmSale();
|
||||
$sale->retrieve($focus->ecmsale_id);
|
||||
$sale_positions = $sale->getPositionList(true);
|
||||
$result = array();
|
||||
foreach ($sale_positions as $pos) {
|
||||
$pos['position'] = $pos['position']+1;
|
||||
$pos['total_vat'] = format_number($pos['total_brutto']-$pos['total_netto']);
|
||||
$pos['total_netto'] = format_number($pos['total_netto']);
|
||||
$pos['price_netto'] = format_number($pos['price_netto']);
|
||||
$pos['total_brutto'] = format_number($pos['total_brutto']);
|
||||
$result[] = $pos;
|
||||
}
|
||||
$sale_positions = $result;
|
||||
//var_dump($sale_positions);
|
||||
|
||||
include_once("modules/EcmPrepaymentInvoices/PDFTemplate/tpl/header.php");
|
||||
include_once("modules/EcmPrepaymentInvoices/PDFTemplate/tpl/footer.php");
|
||||
include_once("modules/EcmPrepaymentInvoices/PDFTemplate/tpl/content.php");
|
||||
|
||||
|
||||
global $current_user, $app_list_strings;
|
||||
$p->SetHTMLHeader($header);
|
||||
$p->SetHTMLFooter($footer);
|
||||
$p->WriteHTML($content);
|
||||
//echo $content;
|
||||
// draw PDF
|
||||
$filename = str_replace(" ", "_", str_replace("/", "_", $focus->document_no));
|
||||
$p->Output($filename . '.pdf', 'I');
|
||||
62
modules/EcmPrepaymentInvoices/field_arrays.php
Normal file
62
modules/EcmPrepaymentInvoices/field_arrays.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?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: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['EcmPrepaymentInvoice']=array(
|
||||
'column_fields'=>array(
|
||||
"id",
|
||||
"date_entered",
|
||||
"date_modified",
|
||||
"modified_user_id",
|
||||
"assigned_user_id",
|
||||
"name",
|
||||
"value"
|
||||
),
|
||||
'list_fields'=>array(
|
||||
'id',
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
'name',
|
||||
),
|
||||
'required_fields' => array('name'=>1),
|
||||
);
|
||||
?>
|
||||
18
modules/EcmPrepaymentInvoices/generateNumber.php
Normal file
18
modules/EcmPrepaymentInvoices/generateNumber.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once('modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php');
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
if(isset($_REQUEST['generate']) && $_REQUEST['generate'] == '1') {
|
||||
try {
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') $focus->retrieve($_REQUEST['record']);
|
||||
$focus->template_id = $_REQUEST['template_id'];
|
||||
$focus->setTemplate();
|
||||
$arr = array();
|
||||
$arr['number'] = (isset($focus->id) && $focus->id != '') ? $focus->number : $focus->generateNumber("ecmprepaymentinvoices","number");
|
||||
$arr['document_no'] = $focus->formatNumber();
|
||||
}
|
||||
catch (Exception $e) { echo ''; return; }
|
||||
$json = getJSONobj();
|
||||
echo '['.$json->encode($arr).']';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
94
modules/EcmPrepaymentInvoices/language/en_us.lang.php
Normal file
94
modules/EcmPrepaymentInvoices/language/en_us.lang.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?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: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$mod_strings = array (
|
||||
'LBL_OTHER_ECMPRAPAYMENTINVOICES' => 'Other prepayment invoices',
|
||||
'LBL_OTHER_ECMPRAPAYMENTINVOICES_SUM' => 'Other prepayment invoices sum',
|
||||
'LBL_TO_INFORMATIONS' => 'To Informations:',
|
||||
'LBL_TEXTS' => 'Texts to PDF:',
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
'LBL_ADS_TEXT' => 'Ads Text',
|
||||
'LBL_EDITTABLE_CODE' => 'Index',
|
||||
'LBL_EDITTABLE_NAME' => 'Name',
|
||||
'LBL_ITEMS' => 'Positions on sale',
|
||||
'LBL_ITEMS_TAB' => 'Products',
|
||||
'LBL_TEXTS_TAB' => 'Text',
|
||||
'LBL_NOT_SAVED' => 'Invoice not saved. Please check all fields are correct!',
|
||||
'LBL_SAVED' => 'Invoice saved successfully.',
|
||||
'LBL_ECMVAT_NAME' => 'Tax',
|
||||
'LBL_TEMPLATE_NAME' => 'Template',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
'LBL_VALUE' => 'Value',
|
||||
'LBL_MODULE_NAME' => 'Vat',
|
||||
'LBL_MODULE_TITLE' => 'Vat: Home',
|
||||
'LBL_MODULE_ID' => 'Vat',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Vat Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Vat List',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Vat',
|
||||
'LBL_SUBJECT' => 'Subject:',
|
||||
'LBL_ECMPREPAYMENTINVOICE' => 'Vat:',
|
||||
'LBL_ECMPREPAYMENTINVOICE_SUBJECT' => 'Vat Subject:',
|
||||
'LBL_LIST_SUBJECT' => 'Name',
|
||||
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
|
||||
'LNK_NEW_ECMPREPAYMENTINVOICE' => 'Create Vat',
|
||||
'LNK_ECMPREPAYMENTINVOICE_LIST' => 'Vat',
|
||||
'ERR_DELETE_RECORD' => 'You must specify a record number in order to delete the vat.',
|
||||
'LBL_LIST_MY_ECMPREPAYMENTINVOICES' => 'My Assigned Vat',
|
||||
|
||||
'LBL_CREATED_BY' => 'Created by:',
|
||||
'LBL_DATE_CREATED' => 'Create Date:',
|
||||
'LBL_MODIFIED_BY' => 'Last Modified by:',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
|
||||
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Vat',
|
||||
'LBL_SYSTEM_ID' => 'System ID',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
'LBL_LIST_VALUE' => 'Value',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
79
modules/EcmPrepaymentInvoices/language/ge_ge.lang.php
Normal file
79
modules/EcmPrepaymentInvoices/language/ge_ge.lang.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$mod_strings = array (
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
'LBL_VALUE' => 'Value',
|
||||
'LBL_MODULE_NAME' => 'Vat',
|
||||
'LBL_MODULE_TITLE' => 'Vat: Home',
|
||||
'LBL_MODULE_ID' => 'Vat',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Vat Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Vat List',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Vat',
|
||||
'LBL_SUBJECT' => 'Subject:',
|
||||
'LBL_ECMPREPAYMENTINVOICE' => 'Vat:',
|
||||
'LBL_ECMPREPAYMENTINVOICE_SUBJECT' => 'Vat Subject:',
|
||||
'LBL_LIST_SUBJECT' => 'Name',
|
||||
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
|
||||
'LNK_NEW_ECMPREPAYMENTINVOICE' => 'Create Vat',
|
||||
'LNK_ECMPREPAYMENTINVOICE_LIST' => 'Vat',
|
||||
'ERR_DELETE_RECORD' => 'You must specify a record number in order to delete the vat.',
|
||||
'LBL_LIST_MY_ECMPREPAYMENTINVOICES' => 'My Assigned Vat',
|
||||
|
||||
'LBL_CREATED_BY' => 'Created by:',
|
||||
'LBL_DATE_CREATED' => 'Create Date:',
|
||||
'LBL_MODIFIED_BY' => 'Last Modified by:',
|
||||
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
|
||||
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Vat',
|
||||
'LBL_SYSTEM_ID' => 'System ID',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
'LBL_LIST_VALUE' => 'Value',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
430
modules/EcmPrepaymentInvoices/language/pl_pl.lang.php
Normal file
430
modules/EcmPrepaymentInvoices/language/pl_pl.lang.php
Normal file
@@ -0,0 +1,430 @@
|
||||
<?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: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$mod_strings = array(
|
||||
'LBL_LIST_VALUE' => 'Wartość',
|
||||
'LBL_OTHER_ECMPRAPAYMENTINVOICES' => 'Poprzednie zaliczki',
|
||||
'LBL_OTHER_ECMPRAPAYMENTINVOICES_SUM' => 'Suma poprzednich zaliczek',
|
||||
'LBL_PDF_CODE' => 'TEST',
|
||||
'LBL_VALUE' => 'Wartość',
|
||||
'LBL_ECMVAT_NAME' => 'Stawka VAT',
|
||||
'LBL_TO_NIP' => 'NIP',
|
||||
'LBL_CURRENCY_TABLE' => 'Tabela kursu NBP',
|
||||
'LBL_BTN_CREATE_ZS' => 'Utwórz ZS',
|
||||
'LBL_ECMPRICE' => 'Ceny B2B',
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'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',
|
||||
'LBL_LISTSALES_CODE' => 'Kod',
|
||||
'LBL_LISTSALES_QTY' => 'Ilość',
|
||||
'LBL_LISTSALES_PRICE' => 'Cena',
|
||||
'LBL_LISTSALES_PARENT_NAME' => 'Kontrahent',
|
||||
'LBL_LISTSALES_SEARCH' => 'Szukaj',
|
||||
'LBL_LISTSALES_CLEAR' => 'Wyczyść',
|
||||
'LBL_LISTSALES_REGISTER_DATE' => 'Data rejestracji',
|
||||
'LBL_LISTSALES_DOCUMENT_NO' => 'Nr dokumentu',
|
||||
'LBL_LISTSALES_NAME_POS' => 'Nazwa',
|
||||
// added 01.09.2009
|
||||
'LBL_ECMLANGUAGE' => 'Język',
|
||||
'LBL_PDF_CONTENT_PAYER' => "PŁATNIK",
|
||||
'LBL_PRICEBOOK' => 'Cennik',
|
||||
'LBL_EDITTABLE_RECIPIENT_CODE' => 'Kod odbiorcy',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_CORRECT_TITLE' => 'Utwórz korektę',
|
||||
'LBL_CORRECT' => 'Utwórz korektę',
|
||||
'LBL_DETAIL_BUTTON' => 'Szczegóły',
|
||||
// added 15.07.2009
|
||||
'LBL_CURRENCY_VALUE_NBP' => 'Kurs NBP',
|
||||
'LBL_CURRENCY_VALUE' => 'Kurs waluty',
|
||||
'LBL_PARENT_SHIPPING_ADDRESS' => 'Adres wysyłki',
|
||||
'LBL_PAYMENT_METHOD_PDF' => 'Metoda płatności',
|
||||
'LBL_TO_PAYMENTS' => 'Płatności',
|
||||
'LBL_TO_PAID' => 'Do zapłaty',
|
||||
'LBL_PDF_CONTENT_INVOICE_FOR' => 'NABYWCA',
|
||||
'LBL_LEFT' => 'Pozostało',
|
||||
'LBL_PREPAID' => 'Przedpłata',
|
||||
'LBL_PREPAID_NR' => 'Numer FK przedpłatowej',
|
||||
'LBL_PAID' => 'Zapłacono',
|
||||
'LBL_PARENT_ILN' => 'ILN',
|
||||
'LBL_PAYMENT_METHOD_PAID' => 'Sposób zapłaty (zapłacono)',
|
||||
'LBL_EDITTABLE_UNIT' => 'J.m.',
|
||||
'LBL_PDF_CORRECT_TO' => "Korekta do:",
|
||||
'LBL_ECMINVOICEOUT_NAME' => 'Faktura do korygowania',
|
||||
'LBL_STOCK_NAME' => 'Magazyn',
|
||||
'LBL_ORDER_NO' => 'Numer zamówienia',
|
||||
'LBL_SUPPLIER_CODE' => 'Kod dostawcy',
|
||||
'LBL_PLACE_PDF' => 'Miejsce wystawienia:',
|
||||
'LBL_PAYMENT_DATE_PDF' => 'Data przedpłaty',
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_PAYMENT_METHOD' => 'Sposób zapłaty',
|
||||
'LBL_PDF_TYPE' => 'Typ pdf',
|
||||
// added 09.02.2009
|
||||
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Pokaż obrazki w PDFie',
|
||||
'LBL_SHOW_RECIPIENT_CODE' => 'Pokaż kod odbiorcy',
|
||||
'LBL_LISTSALES_NAME' => 'Raport: Produkty na fakturach',
|
||||
'LBL_LIST_SALES_RAP' => 'Produkty na fakturach',
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_LISTSALES_YEAR' => 'Rok',
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Faktury',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Faktury: Strona Główna',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmInvoiceOuts',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Faktur',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowa Faktura',
|
||||
|
||||
'LBL_DETAILS' => 'Szczególy Faktury',
|
||||
|
||||
'LBL_ITEMS' => 'Zalaczone Produkty:',
|
||||
|
||||
'LBL_TEXTS' => 'Teksty do PDFa:',
|
||||
|
||||
'LBL_PREVIEW' => 'Podglad PDFa:',
|
||||
|
||||
'LBL_EMAIL' => 'Stwórz Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'Informacje o firmie:',
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Szczególy',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Produkty',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Teksty',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Podglad',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Data dodania',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date modyfikacji',
|
||||
|
||||
'LBL_MODIFIED' => 'Ostatnio modyfikowane',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisane do',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane do',
|
||||
|
||||
'LBL_CREATED' => 'Utworzone przez',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Utworzone przez',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Zmodyfikowane przez',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Przypisane do',
|
||||
|
||||
'LBL_DELETED_BY' => 'Usuniete przez',
|
||||
|
||||
'LBL_NUMBER' => 'Numer',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Numer',
|
||||
|
||||
'LBL_PARENT' => 'Do',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Firma',
|
||||
|
||||
'LBL_PARENT_ID' => 'Firma Id',
|
||||
|
||||
'LBL_TYPE' => 'Typ',
|
||||
|
||||
'LBL_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 Płatności',
|
||||
'LBL_PAYMENTCONDITION_VALUE' => 'Termin płatności',
|
||||
'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 Fakturę',
|
||||
|
||||
'LNK_ECMQUOTES_LIST' => 'Lista Faktur',
|
||||
|
||||
'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',
|
||||
// PAYER START
|
||||
'LBL_PARENT_PAYER_ADDRESS' => 'Adres płatnika',
|
||||
// PAYER END
|
||||
'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' => 'Faktura nie została zapisana. Sprawdz czy wszytskie pola sa poprawne!',
|
||||
|
||||
'LBL_SAVED' => 'Faktura 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',
|
||||
// PDF labels
|
||||
'LBL_PDF_FOOTER_KRS' => 'KRS:',
|
||||
'LBL_PDF_FOOTER_NIP' => 'NIP UE:',
|
||||
'LBL_PDF_FOOTER_REGON' => 'REGON:',
|
||||
'LBL_PDF_FOOTER_BANK' => 'Bank:',
|
||||
'LBL_PDF_FOOTER_BANK_ACCOUNT' => 'Number konta:',
|
||||
'LBL_PDF_FOOTER_GIOS' => 'Numer GIOS:',
|
||||
'LBL_PDF_CONTENT_QUOTE_FOR' => 'Oferta dla:',
|
||||
'LBL_PDF_CONTENT_REGISTER_DATE' => 'Data wystawienia:',
|
||||
'LBL_PDF_CONTENT_ISSUED_BY' => 'Wystawił:',
|
||||
'LBL_PDF_CONTENT_NUMBER' => 'Numer:',
|
||||
'LBL_PDF_CONTENT_LIST_POSITION' => 'Lp.',
|
||||
'LBL_PDF_CONTENT_LIST_IMAGE' => 'Zdjęcie',
|
||||
'LBL_PDF_CONTENT_LIST_NAME' => 'Nazwa',
|
||||
'LBL_PDF_CONTENT_LIST_CODE' => 'Indeks',
|
||||
'LBL_PDF_CONTENT_LIST_QTY' => 'Ilość',
|
||||
'LBL_PDF_CONTENT_LIST_UNIT' => 'j.m.',
|
||||
'LBL_PDF_CONTENT_LIST_EAN' => 'Ean',
|
||||
'LBL_PDF_CONTENT_LIST_EAN2' => 'Ean 2',
|
||||
'LBL_PDF_CONTENT_LIST_RECIPIENT_CODE' => 'Kod odbiorcy',
|
||||
'LBL_PDF_CONTENT_LIST_REMARKS' => 'Uwagi',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_START' => 'Cena początkowa',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_NETTO' => 'Cena netto',
|
||||
'LBL_PDF_CONTENT_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_CONTENT_LIST_TOTAL_NETTO' => 'Wartość netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_NETTO' => 'Suma netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_BRUTTO' => 'Suma brutto',
|
||||
'LBL_PDF_CONTENT_PARENT_DOCUMENT_WZ' => 'Nr dokumentu WZ',
|
||||
'LBL_PDF_CONTENT_PARENT_DOCUMENT_NO' => 'Nr zamówienia',
|
||||
'LBL_PDF_CONTENT_PARENT_SUPPLIER_CODE' => 'Kod dostawcy',
|
||||
'LBL_PDF_CONTENT_DELIVERY' => 'DOSTAWA DO',
|
||||
'LBL_PDF_CONTENT_SELL_DATE' => 'Data sprzedaży:',
|
||||
'LBL_PDF_CONTENT_NIP' => 'NIP:',
|
||||
'LBL_PDF_TO_PAY' => 'Do zapłaty:',
|
||||
'LBL_PDF_PAID' => 'Zapłacono:',
|
||||
'LBL_PDF_LEFT_TO_PAID' => 'Pozostało:'
|
||||
);
|
||||
44
modules/EcmPrepaymentInvoices/metadata/SearchFields.php
Normal file
44
modules/EcmPrepaymentInvoices/metadata/SearchFields.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
$searchFields['EcmPrepaymentInvoices'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'value' => 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'),
|
||||
);
|
||||
?>
|
||||
64
modules/EcmPrepaymentInvoices/metadata/additionalDetails.php
Normal file
64
modules/EcmPrepaymentInvoices/metadata/additionalDetails.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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/utils.php');
|
||||
|
||||
function additionalDetailsEcmPrepaymentInvoice($fields) {
|
||||
static $mod_strings;
|
||||
global $app_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'EcmPrepaymentInvoices');
|
||||
}
|
||||
|
||||
$overlib_string = '';
|
||||
|
||||
if(!empty($fields['DATE_ENTERED']))
|
||||
$overlib_string .= '<b>'. $app_strings['LBL_DATE_ENTERED'] . '</b> ' . $fields['DATE_ENTERED'] . '<br>';
|
||||
if(!empty($fields['NAME']))
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_NAME'] . '</b> ' . $fields['NAME'] . '<br>';
|
||||
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=EcmPrepaymentInvoices&return_module=EcmPrepaymentInvoices&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=EcmPrepaymentInvoices&return_module=EcmPrepaymentInvoices&record={$fields['ID']}");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
155
modules/EcmPrepaymentInvoices/metadata/detailviewdefs.php
Normal file
155
modules/EcmPrepaymentInvoices/metadata/detailviewdefs.php
Normal file
@@ -0,0 +1,155 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
$viewdefs['EcmPrepaymentInvoices']['DetailView'] = array(
|
||||
'templateMeta'=>array(
|
||||
'form'=>array(
|
||||
'buttons' => array (
|
||||
array (
|
||||
'customCode' => '{$CREATE_PDF}'
|
||||
),
|
||||
array (
|
||||
'customCode' => ' <input name="edit" id="edit" class="button" onclick="window.location = \'index.php?module=EcmPrepaymentInvoices&action=EditView&record={$fields.id.value}&isDuplicate=false\';" type="button" value="Edytuj">'
|
||||
),
|
||||
array (
|
||||
'customCode' => ' <input name="addInvoice" id="addInvoice" class="button" onclick="window.location = \'index.php?module=EcmInvoiceOuts&action=EditView&prepaymentinvoice_id={$fields.id.value}&isDuplicate=false\';" type="button" value="Utwórz fakturę rozliczeniową">'
|
||||
),
|
||||
),
|
||||
),
|
||||
'maxColumns'=>'2',
|
||||
'widths'=>array(
|
||||
array(
|
||||
'label'=>'10',
|
||||
'field' =>'30'
|
||||
),
|
||||
array(
|
||||
'label'=>'10',
|
||||
'field'=>'30'
|
||||
)
|
||||
),
|
||||
'includes' => array(
|
||||
array('file'=>'modules/EcmPrepaymentInvoices/EcmPrepaymentInvoicesDetailView.js'),
|
||||
array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
|
||||
array('file'=>'include/JSON.js'),
|
||||
array('file'=>'include/javascript/quicksearch.js'),
|
||||
//array('file'=>'modules/EcmInvoiceOuts/MyTable.js'),
|
||||
array('file'=>'modules/EcmInvoiceOuts/formloader.js'),
|
||||
array('file'=>'modules/EcmProducts/mintajax.js'),
|
||||
array('file'=>'modules/EcmProducts/helper.js'),
|
||||
),
|
||||
),
|
||||
'panels'=>array(
|
||||
'LBL_DETAILS_TAB'=>array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => 'f',
|
||||
'customCode' => '{$fields.document_no.value}'
|
||||
),
|
||||
'assigned_user_name'
|
||||
),
|
||||
array('parent_name','template_name'),
|
||||
array(
|
||||
array('name'=>'currency_id','label'=>'LBL_CURRENCY'),
|
||||
array('name'=>'currency_value_nbp','label'=>'Kurs NBP'),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name'=>'inv_value',
|
||||
'label'=>'LBL_VALUE',
|
||||
),
|
||||
array(
|
||||
'label'=>'Zamówienie',
|
||||
'customCode'=>'<a href="index.php?module=EcmSales&action=DetailView&record={$ecmsale_id}">{$ecmsale_name}</a>',
|
||||
),
|
||||
),
|
||||
array('register_date','payment_date'),
|
||||
array(array('name'=>'ecmvat_name','label'=>'Stawka Vat'),'ecmpaymentcondition_name'),
|
||||
array('description',''),
|
||||
array(
|
||||
array(
|
||||
'label'=>'LBL_OTHER_ECMPRAPAYMENTINVOICES',
|
||||
'customCode'=>'{$other_ecmprepaymentinvoices}'
|
||||
),
|
||||
array(
|
||||
'label'=>'LBL_OTHER_ECMPRAPAYMENTINVOICES_SUM',
|
||||
'customCode'=>'{$other_ecmprepayment_invoices_sum}',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_contact_name',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
array(
|
||||
'name' => 'ecmlanguage',
|
||||
'tabIndex' => '1',
|
||||
)
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_street',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '{$fields.parent_address_street.value}',
|
||||
),
|
||||
array(
|
||||
'name' => 'to_vatid',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '{$fields.parent_address_postalcode.value} {$fields.parent_address_city.value}'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_country',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
152
modules/EcmPrepaymentInvoices/metadata/editviewdefs.php
Normal file
152
modules/EcmPrepaymentInvoices/metadata/editviewdefs.php
Normal file
@@ -0,0 +1,152 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
$viewdefs['EcmPrepaymentInvoices']['EditView'] = array(
|
||||
'templateMeta'=>array(
|
||||
'form' => array(
|
||||
'buttons'=>array(
|
||||
array('customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="return SaveForm();" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">'),
|
||||
'CANCEL'
|
||||
),
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="isSale" id="isSale" value=\'{$isSale}\'>',
|
||||
),
|
||||
),
|
||||
'maxColumns'=>'2',
|
||||
'widths'=>array(
|
||||
array('label'=>'10','field'=>'30'),
|
||||
array('label'=>'10','field'=>'30'),
|
||||
),
|
||||
'includes' => array(
|
||||
array('file'=>'include/JSON.js'),
|
||||
array('file'=>'include/javascript/quicksearch.js'),
|
||||
array('file'=>'modules/EcmPrepaymentInvoices/EcmPrepaymentInvoices.js'),
|
||||
// array('file'=>'modules/EcmInvoiceOutOlds/MyTable.js'),
|
||||
array('file'=>'modules/EcmInvoiceOuts/formloader.js'),
|
||||
array('file'=>'modules/EcmProducts/mintajax.js'),
|
||||
array('file'=>'modules/EcmProducts/helper.js'),
|
||||
),
|
||||
),
|
||||
'panels'=>array(
|
||||
'LBL_DETAILS_TAB'=>array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => 'f',
|
||||
'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}\'>'
|
||||
),
|
||||
'assigned_user_name'
|
||||
),
|
||||
array('parent_name',
|
||||
array(
|
||||
'name' => 'template_name',
|
||||
'label'=>'LBL_TEMPLATE_NAME',
|
||||
'customCode'=>'<select id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">{$DOCUMENT_TEMPLATES_OPTIONS}</select><input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">'
|
||||
),
|
||||
|
||||
),
|
||||
array(
|
||||
array('name'=>'currency_id','label'=>'LBL_CURRENCY'),
|
||||
array('name'=>'currency_value_nbp','label'=>'Kurs NBP'),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name'=>'inv_value',
|
||||
'label'=>'LBL_VALUE',
|
||||
),
|
||||
array(
|
||||
'label'=>'Zamówienie',
|
||||
'customCode'=>'<input type="hidden" name="ecmsale_id" value="{$ecmsale_id}"><a href="index.php?module=EcmSales&action=DetailView&record={$ecmsale_id}">{$ecmsale_name}</a>',
|
||||
),
|
||||
),
|
||||
array('register_date','payment_date'),
|
||||
array(
|
||||
array(
|
||||
'name' => 'ecmvat_name',
|
||||
'label'=>'LBL_ECMVAT_NAME',
|
||||
'customCode'=>'<select id="ecmvat_id" name="ecmvat_id" onChange="document.getElementById(\'ecmvat_name\').value=this.options[this.selectedIndex].text;">{$ECMVATS_OPTIONS}</select><input id="ecmvat_name" name="ecmvat_name" type="hidden"/>'
|
||||
),
|
||||
'ecmpaymentcondition_name'),
|
||||
array(
|
||||
array(
|
||||
'name' => 'description',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_contact_name',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
array(
|
||||
'name' => 'ecmlanguage',
|
||||
'tabIndex' => '1',
|
||||
)
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'parent_address_street',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<textarea tabindex="1" id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150" >{$fields.parent_address_street.value}</textarea>',
|
||||
),
|
||||
array(
|
||||
'name' => 'to_vatid',
|
||||
'tabIndex' => '1',
|
||||
),
|
||||
),
|
||||
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',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
80
modules/EcmPrepaymentInvoices/metadata/listviewdefs.php
Normal file
80
modules/EcmPrepaymentInvoices/metadata/listviewdefs.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?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".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
$listViewDefs['EcmPrepaymentInvoices'] = array(
|
||||
'DOCUMENT_NO' => array(
|
||||
'width' => '12',
|
||||
'label' => 'Nr faktury',
|
||||
'default' => true,
|
||||
'link' => true
|
||||
),
|
||||
'PARENT_ID' => array(
|
||||
'width'=>'1',
|
||||
'sortable'=>false,
|
||||
'label'=>' ',
|
||||
'default'=>true,
|
||||
'customCode'=>' ',
|
||||
),
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_PARENT_NAME',
|
||||
'default' => true,
|
||||
'link'=>true,
|
||||
'module'=>'Accounts',
|
||||
'id'=>'PARENT_ID',
|
||||
),
|
||||
'REGISTER_DATE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_REGISTER_DATE',
|
||||
'default' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
'INV_VALUE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_VALUE',
|
||||
'default' => true
|
||||
),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '9',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
)
|
||||
);
|
||||
?>
|
||||
51
modules/EcmPrepaymentInvoices/metadata/metafiles.php
Normal file
51
modules/EcmPrepaymentInvoices/metadata/metafiles.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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 Jun 1, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$metafiles['EcmPrepaymentInvoices'] = array(
|
||||
'detailviewdefs' => 'modules/EcmPrepaymentInvoices/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/EcmPrepaymentInvoices/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/EcmPrepaymentInvoices/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/EcmPrepaymentInvoices/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/EcmPrepaymentInvoices/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/EcmPrepaymentInvoices/metadata/SearchFields.php',
|
||||
|
||||
);
|
||||
?>
|
||||
67
modules/EcmPrepaymentInvoices/metadata/popupdefs.php
Normal file
67
modules/EcmPrepaymentInvoices/metadata/popupdefs.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
$popupMeta = array('moduleMain' => 'EcmPrepaymentInvoice',
|
||||
'varName' => 'ECMPREPAYMENTINVOICE',
|
||||
'orderBy' => 'ecmprepaymentinvoices.name',
|
||||
'whereClauses' =>
|
||||
array('name' => 'ecmprepaymentinvoices.name'),
|
||||
'listviewdefs' => array(
|
||||
'NAME' => array(
|
||||
'width' => '32',
|
||||
'label' => 'LBL_LIST_SUBJECT',
|
||||
'default' => true,
|
||||
'link' => true),
|
||||
'VALUE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_VALUE',
|
||||
'default' => true),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '9',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true)
|
||||
|
||||
),
|
||||
'searchdefs' => array(
|
||||
'name',
|
||||
'value',
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
|
||||
61
modules/EcmPrepaymentInvoices/metadata/searchdefs.php
Normal file
61
modules/EcmPrepaymentInvoices/metadata/searchdefs.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?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 May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$searchdefs['EcmPrepaymentInvoices'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'document_no',
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'document_no',
|
||||
'parent_name',
|
||||
'register_date',
|
||||
array('name'=>'value','label'=>'Wartosc'),
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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".
|
||||
*********************************************************************************/
|
||||
$viewdefs['EcmPrepaymentInvoices']['SideQuickCreate'] = array(
|
||||
'templateMeta' => array('form'=>array('buttons'=>array('SAVE'),
|
||||
'button_location'=>'bottom',
|
||||
'headerTpl'=>'include/EditView/header.tpl',
|
||||
'footerTpl'=>'include/EditView/footer.tpl',
|
||||
),
|
||||
'maxColumns' => '1',
|
||||
'panelClass'=>'none',
|
||||
|
||||
'labelsOnTop'=>true,
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'DEFAULT' =>
|
||||
array (
|
||||
array (
|
||||
array('name'=>'name', 'displayParams'=>array('size'=>20, 'required'=>true)),
|
||||
),
|
||||
array(
|
||||
array('name'=>'value', 'displayParams'=>array('size'=>20)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
65
modules/EcmPrepaymentInvoices/metadata/studio.php
Normal file
65
modules/EcmPrepaymentInvoices/metadata/studio.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?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".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['EcmPrepaymentInvoices'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/EcmPrepaymentInvoices/DetailView.html',
|
||||
'php_file'=>'modules/EcmPrepaymentInvoices/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/EcmPrepaymentInvoices/EditView.html',
|
||||
'php_file'=>'modules/EcmPrepaymentInvoices/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/EcmPrepaymentInvoices/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/EcmPrepaymentInvoices/SearchForm.html',
|
||||
'php_file'=>'modules/EcmPrepaymentInvoices/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
42
modules/EcmPrepaymentInvoices/metadata/subpaneldefs.php
Normal file
42
modules/EcmPrepaymentInvoices/metadata/subpaneldefs.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for EcmPrepaymentInvoices
|
||||
*
|
||||
* 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['EcmPrepaymentInvoices']['subpanel_setup'] = array(
|
||||
);
|
||||
?>
|
||||
91
modules/EcmPrepaymentInvoices/metadata/subpanels/default.php
Normal file
91
modules/EcmPrepaymentInvoices/metadata/subpanels/default.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for EcmPrepaymentInvoices
|
||||
*
|
||||
* 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' => 'EcmPrepaymentInvoices'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'ecmprepaymentinvoice_number'=>array(
|
||||
'vname' => 'LBL_LIST_NUMBER',
|
||||
'width' => '5%',
|
||||
),
|
||||
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_LIST_SUBJECT',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '50%',
|
||||
),
|
||||
'status'=>array(
|
||||
'vname' => 'LBL_LIST_STATUS',
|
||||
'width' => '15%',
|
||||
),
|
||||
'type'=>array(
|
||||
'vname' => 'LBL_LIST_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'priority'=>array(
|
||||
'vname' => 'LBL_LIST_PRIORITY',
|
||||
'width' => '11%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmPrepaymentInvoices',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmPrepaymentInvoices',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
91
modules/EcmPrepaymentInvoices/previewPDF.php
Normal file
91
modules/EcmPrepaymentInvoices/previewPDF.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
error_reporting(E_PARSE | E_WARNING);
|
||||
|
||||
$json = getJSONobj();
|
||||
$pll = array(); $i=0; while(isset($_POST['p_'.$i])) { $pll[] = $json->decode(htmlspecialchars_decode($_POST['p_'.$i])); $_POST['p_'.$i] = ''; $i++;}
|
||||
$_POST = $json->decode(htmlspecialchars_decode($_POST['otherFormData']));
|
||||
$_POST['position_list'] = $pll;
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $_REQUEST['cache'] != "fromJava") {
|
||||
|
||||
require_once("modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php");
|
||||
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
|
||||
$method = (isset($_REQUEST['method']) && $_REQUEST['method'] != '') ? $_REQUEST['method'] : 'D';
|
||||
|
||||
$focus->getPDF($_REQUEST['record'],$method);
|
||||
|
||||
} else
|
||||
|
||||
if($_REQUEST['cache'] == "fromJava" && $_GET['from']!="EcmPrepaymentInvoices") {
|
||||
|
||||
$_SESSION['PDF_ECMINVOICEOUTS'] = $_POST;
|
||||
|
||||
} else
|
||||
|
||||
if($_GET['from']=="EcmPrepaymentInvoices") {
|
||||
|
||||
|
||||
|
||||
require_once("modules/EcmPrepaymentInvoices/EcmPrepaymentInvoice.php");
|
||||
|
||||
$focus = new EcmPrepaymentInvoice();
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINVOICEOUTS']['record']) && $_SESSION['PDF_ECMINVOICEOUTS']['record'] != '') {
|
||||
|
||||
$focus->retrieve($_SESSION['PDF_ECMINVOICEOUTS']['record']);
|
||||
|
||||
}
|
||||
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
|
||||
ACLController::displayNoAccess(true);
|
||||
|
||||
sugar_cleanup(true);
|
||||
|
||||
}
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINVOICEOUTS'][$field])){
|
||||
|
||||
$value = $_SESSION['PDF_ECMINVOICEOUTS'][$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINVOICEOUTS'][$field])){
|
||||
|
||||
$value = $_SESSION['PDF_ECMINVOICEOUTS'][$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isset($_SESSION['PDF_ECMINVOICEOUTS']['to_is_vat_free']) && $_SESSION['PDF_ECMINVOICEOUTS']['to_is_vat_free']) $focus->to_is_vat_free = 1; else $focus->to_is_vat_free = 0;
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$pl = $_SESSION['PDF_ECMINVOICEOUTS']['position_list'];
|
||||
|
||||
$focus->position_list = $pl;
|
||||
|
||||
$focus->document_no = $_SESSION['PDF_ECMINVOICEOUTS']['document_no'];
|
||||
|
||||
$focus->wz_id=$_SESSION['PDF_ECMINVOICEOUTS']['out_id'];
|
||||
|
||||
//$focus->ecmpaymentcondition_text = EcmPrepaymentInvoice::getTranslation('EcmPaymentConditions',$focus->ecmpaymentcondition_id,$focus->ecmlanguage);
|
||||
//die();
|
||||
$focus->getPDF();
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
95
modules/EcmPrepaymentInvoices/tpls/QuickCreate.tpl
Normal file
95
modules/EcmPrepaymentInvoices/tpls/QuickCreate.tpl
Normal file
@@ -0,0 +1,95 @@
|
||||
{*
|
||||
|
||||
/**
|
||||
* 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".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
|
||||
<form name="ecmprepaymentinvoicesQuickCreate" id="ecmprepaymentinvoicesQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="EcmPrepaymentInvoices">
|
||||
<input type="hidden" name="email_id" value="{$REQUEST.email_id}">
|
||||
<input type="hidden" name="account_id" value="{$REQUEST.account_id}">
|
||||
<input type="hidden" name="case_id" value="{$REQUEST.acase_id}">
|
||||
<input type="hidden" name="contact_id" value="{$REQUEST.contact_id}">
|
||||
<input type="hidden" name="return_action" value="{$REQUEST.return_action}">
|
||||
<input type="hidden" name="return_module" value="{$REQUEST.return_module}">
|
||||
<input type="hidden" name="return_id" value="{$REQUEST.return_id}">
|
||||
<input type="hidden" name="action" value='Save'>
|
||||
<input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
|
||||
<input type="hidden" name="to_pdf" value='1'>
|
||||
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
|
||||
|
||||
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" style="padding-bottom: 2px;">
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" {$saveOnclick|default:"onclick=\"return check_form('EcmPrepaymentInvoicesQuickCreate');\""} value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" {$cancelOnclick|default:"onclick=\"this.form.action.value='$RETURN_ACTION'; this.form.module.value='$RETURN_MODULE'; this.form.record.value='$RETURN_ID'\""} value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
|
||||
<input title="{$APP.LBL_FULL_FORM_BUTTON_TITLE}" accessKey="{$APP.LBL_FULL_FORM_BUTTON_KEY}" class="button" type="submit" name="button" onclick="this.form.to_pdf.value='0';this.form.action.value='EditView'; this.form.module.value='EcmPrepaymentInvoices';" value=" {$APP.LBL_FULL_FORM_BUTTON_LABEL} "></td>
|
||||
<td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th align="left" class="dataLabel" colspan="4"><h4 class="dataLabel"><slot>{$MOD.LBL_ECMPREPAYMENTINVOICE_INFORMATION}</slot></h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel" width="15%"><slot>{$MOD.LBL_SUBJECT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td width="35%"><slot><textarea name='name' cols="40" tabindex='1' rows="1">{$NAME}</textarea></slot></td>
|
||||
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_TYPE}</slot></td>
|
||||
<td width="35%"><slot><select tabindex='2' name='type'>{$TYPE_OPTIONS}</select></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel" rowspan="2" width="15%"><slot>{$MOD.LBL_DESCRIPTION}</slot></td>
|
||||
<td rowspan="2" width="35%"><slot><textarea name='description' tabindex='1' cols="40" rows="4">{$DESCRIPTION}</textarea></slot></td>
|
||||
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_PRIORITY}</slot></td>
|
||||
<td class="dataField" nowrap width="35%"><slot><select tabindex='2' name='priority'>{$PRIORITY_OPTIONS}</select></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="dataLabel" width="15%"><slot>{$MOD.LBL_STATUS}</slot></td>
|
||||
<td width="35%"><slot><select tabindex='2' name='status'>{$STATUS_OPTIONS}</select></slot></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
{$additionalScripts}
|
||||
</script>
|
||||
388
modules/EcmPrepaymentInvoices/vardefs.php
Normal file
388
modules/EcmPrepaymentInvoices/vardefs.php
Normal file
@@ -0,0 +1,388 @@
|
||||
<?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
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
$dictionary['EcmPrepaymentInvoice']=array(
|
||||
'table'=>'ecmprepaymentinvoices',
|
||||
'audited'=>false,
|
||||
'comment'=>'EcmPrepaymentInvoices',
|
||||
'duplicate_merge'=>true ,
|
||||
'unified_search'=>true,
|
||||
'fields'=>array(
|
||||
'document_no' => array(
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '30',
|
||||
),
|
||||
'template_id' =>
|
||||
array (
|
||||
'name' => 'template_id',
|
||||
'vname' => 'LBL_TEMPLATE_ID',
|
||||
'type' => 'id',
|
||||
'required_option' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'template_name' =>
|
||||
array (
|
||||
'name' => 'template_name',
|
||||
'vname' => 'LBL_TEMPLATE_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
),
|
||||
|
||||
'ecmvat_id' =>
|
||||
array (
|
||||
'name' => 'ecmvat_id',
|
||||
'vname' => 'LBL_ECMVAT_ID',
|
||||
'type' => 'id',
|
||||
'required_option' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'ecmvat_name' =>
|
||||
array (
|
||||
'name' => 'ecmvat_name',
|
||||
'vname' => 'LBL_ECMVAT_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'ecmvat_value' =>
|
||||
array (
|
||||
'name' => 'ecmvat_value',
|
||||
'vname' => 'LBL_ECMVAT_VALUE',
|
||||
'type' => 'decimal',
|
||||
'len' => '10,4',
|
||||
'required_option' => false,
|
||||
'unified_search' => true,
|
||||
'required' => false,
|
||||
),
|
||||
'currency_id' =>
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
'type' => 'enum',
|
||||
'options' => 'currency_dom',
|
||||
'label' => 'LBL_CURRENCY',
|
||||
'required' => true,
|
||||
),
|
||||
'currency_value' =>
|
||||
array (
|
||||
'name' => 'currency_value',
|
||||
'type' => 'decimal',
|
||||
'len' => '10,4',
|
||||
'label' => 'LBL_CURRENCY_VALUE',
|
||||
),
|
||||
'currency_value_nbp' =>
|
||||
array (
|
||||
'name' => 'currency_value_nbp',
|
||||
'type' => 'decimal',
|
||||
'len' => '10,4',
|
||||
'label' => 'LBL_CURRENCY_VALUE_NBP',
|
||||
),
|
||||
'products_on_pdf' => array (
|
||||
'name' => 'products_on_pdf',
|
||||
'type' => 'text',
|
||||
),
|
||||
'other_ecmprepaymentinvoices' =>
|
||||
array (
|
||||
'name' => 'other_ecmprepaymentinvoices',
|
||||
'vname' => 'LBL_OTHER_ECMPRAPAYMENTINVOICES',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'other_ecmprepaymentinvoices_sum' =>
|
||||
array (
|
||||
'name' => 'other_ecmprepaymentinvoices',
|
||||
'vname' => 'LBL_OTHER_ECMPRAPAYMENTINVOICES_SUM',
|
||||
'type' => 'decimal',
|
||||
'len' => '10,2',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => true,
|
||||
),
|
||||
'payment_date' => array (
|
||||
'name' => 'payment_date',
|
||||
'vname' => 'LBL_PAYMENT_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => true,
|
||||
),
|
||||
'ecmpaymentcondition_id' =>
|
||||
array (
|
||||
'name' => 'ecmpaymentcondition_id',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'ecmpaymentcondition_id',
|
||||
'vname' => 'LBL_PAYMENTCONDITION_ID',
|
||||
'group' => 'ecmpaymentcondition_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'ecmpaymentconditions',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'ecmpaymentcondition_name' =>
|
||||
array (
|
||||
'name' => 'ecmpaymentcondition_name',
|
||||
'vname' => 'LBL_PAYMENTCONDITION_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'ecmpaymentcondition',
|
||||
'id_name' => 'ecmpaymentcondition_id',
|
||||
'module' => 'EcmPaymentConditions',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'ecmpaymentcondition_text' =>
|
||||
array (
|
||||
'name' => 'ecmpaymentcondition_text',
|
||||
'vname' => 'LBL_PAYMENTCONDITION_TEXT',
|
||||
'type' => 'text',
|
||||
'reportable' => false,
|
||||
'module' => 'EcmPaymentConditions',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'parent_type' => array(
|
||||
'name'=>'parent_type',
|
||||
'vname'=>'LBL_PARENT',
|
||||
'type'=>'varchar',
|
||||
'required'=>true,
|
||||
'reportable'=>false,
|
||||
'len'=>'25',
|
||||
'comment' => 'The Sugar object to which the call is related',
|
||||
'massupdate' => false,
|
||||
),
|
||||
'parent_name' => array(
|
||||
'name'=> 'parent_name',
|
||||
'parent_type'=>'ecmreceipts_parent_dom' ,
|
||||
'id_name'=>'parent_id',
|
||||
'vname'=>'LBL_PARENT_NAME',
|
||||
'type'=>'relate',
|
||||
'group'=>'parent_name',
|
||||
'dbtype' => 'varchar',
|
||||
'len' => '255',
|
||||
'module' => 'Accounts',
|
||||
'massupdate' => false,
|
||||
'required' => true,
|
||||
),
|
||||
'parent_id' => array (
|
||||
'name' => 'parent_id',
|
||||
'type' => 'id',
|
||||
'module' => 'Accounts',
|
||||
'vname' => 'LBL_PARENT_ID',
|
||||
'group'=>'parent_name',
|
||||
'massupdate' => false,
|
||||
'reportable'=>false,
|
||||
'required' => true,
|
||||
),
|
||||
'parent_name_copy' => array(
|
||||
'name' => 'parent_name_copy',
|
||||
'vname' => 'LBL_PARENT_NAME_COPY',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'parent_contact_name' => array (
|
||||
'name' => 'parent_contact_name',
|
||||
'vname' => 'LBL_PARENT_CONTACT_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_contact_title' => array (
|
||||
'name' => 'parent_contact_title',
|
||||
'vname' => 'LBL_PARENT_CONTACT_TITLE',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'parent_address_street' =>
|
||||
array (
|
||||
'name' => 'parent_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '150',
|
||||
'comment' => 'The street address used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled',
|
||||
'required' => true,
|
||||
),
|
||||
'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',
|
||||
'required' => true,
|
||||
),
|
||||
'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',
|
||||
'required' => true,
|
||||
),
|
||||
'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',
|
||||
),
|
||||
'to_vatid' =>
|
||||
array (
|
||||
'name' => 'to_vatid',
|
||||
'vname' => 'LBL_TO_NIP',
|
||||
'type' => 'varchar',
|
||||
'len' => 15,
|
||||
'required' => true,
|
||||
),
|
||||
'ecmlanguage' =>
|
||||
array(
|
||||
'name' => 'ecmlanguage',
|
||||
'vname' => 'LBL_ECMLANGUAGE',
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmlanguages_dom',
|
||||
'required' => true,
|
||||
'len' => 35,
|
||||
'massupdate' => false,
|
||||
),
|
||||
'ecmsale_id' =>
|
||||
array (
|
||||
'name' => 'ecmsale_id',
|
||||
'type' => 'id',
|
||||
'vname' => 'LBL_ECMSALE_ID',
|
||||
'group'=>'ecmsale_name',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'ecmsale_name' =>
|
||||
array (
|
||||
'name' => 'ecmsale_name',
|
||||
'rname'=>'document_no',
|
||||
'dbType'=> 'varchar',
|
||||
'len' => '255',
|
||||
'group'=>'ecmsale_name',
|
||||
'vname' => 'LBL_ECMSALE_NAME',
|
||||
'reportable'=>false,
|
||||
'id_name' => 'ecmsale_id',
|
||||
'join_name' => 'ecmsales',
|
||||
'type' => 'relate',
|
||||
'module' => 'EcmSales',
|
||||
'link'=>'ecmsales',
|
||||
),
|
||||
'inv_value' =>
|
||||
array(
|
||||
'name' => 'inv_value',
|
||||
'type' => 'decimal',
|
||||
'len' => '10,2',
|
||||
),
|
||||
'number' => array(
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '20',
|
||||
),
|
||||
),
|
||||
'indices'=>array(
|
||||
array('name'=>'idx_ecmprepaymentinvoice_id_del','type'=>'index','fields'=>array('id','deleted')),
|
||||
array('name'=>'idx_ecmprepaymentinvoice_assigned_del','type'=>'index','fields'=>array( 'deleted', 'assigned_user_id')),
|
||||
),
|
||||
'relationships'=>array(
|
||||
'ecmprepaymentinvoices_assigned_user'=>array(
|
||||
'lhs_module'=>'Users',
|
||||
'lhs_table'=>'users',
|
||||
'lhs_key'=>'id',
|
||||
'rhs_module'=>'EcmPrepaymentInvoices',
|
||||
'rhs_table'=>'ecmprepaymentinvoices',
|
||||
'rhs_key'=>'assigned_user_id',
|
||||
'relationship_type'=>'one-to-many'
|
||||
),
|
||||
'ecmprepaymentinvoices_modified_user'=>array(
|
||||
'lhs_module'=>'Users',
|
||||
'lhs_table'=>'users',
|
||||
'lhs_key'=>'id',
|
||||
'rhs_module'=>'EcmPrepaymentInvoices',
|
||||
'rhs_table'=>'ecmprepaymentinvoices',
|
||||
'rhs_key'=>'modified_user_id',
|
||||
'relationship_type'=>'one-to-many'
|
||||
),
|
||||
'ecmprepaymentinvoices_created_by'=>array(
|
||||
'lhs_module'=>'Users',
|
||||
'lhs_table'=>'users',
|
||||
'lhs_key'=>'id',
|
||||
'rhs_module'=>'EcmPrepaymentInvoices',
|
||||
'rhs_table'=>'ecmprepaymentinvoices',
|
||||
'rhs_key'=>'created_by',
|
||||
'relationship_type'=>'one-to-many'
|
||||
)
|
||||
),
|
||||
'optimistic_locking'=>true,
|
||||
);
|
||||
require_once('include/SugarObjects/VardefManager.php');
|
||||
VardefManager::createVardef('EcmPrepaymentInvoices','EcmPrepaymentInvoice', array('default','assignable'));
|
||||
?>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?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-2010 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/MVC/View/views/view.detail.php');
|
||||
|
||||
class EcmPrepaymentInvoicesViewDetail extends ViewDetail {
|
||||
|
||||
|
||||
function EcmPrepaymentInvoicesViewDetail(){
|
||||
parent::ViewDetail();
|
||||
}
|
||||
|
||||
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, 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl');
|
||||
}
|
||||
function display(){
|
||||
global $db;
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
|
||||
include_once("modules/EcmSales/EcmSale.php");
|
||||
$sale=new EcmSale();
|
||||
$sale->retrieve($this->bean->ecmsale_id);
|
||||
|
||||
$this->ss->assign("ecmsale_id", $this->bean->ecmsale_id);
|
||||
$this->ss->assign("ecmsale_name", $sale->document_no);
|
||||
|
||||
$this->dv->process();
|
||||
global $mod_strings;
|
||||
|
||||
echo $this->dv->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
89
modules/EcmPrepaymentInvoices/views/EditView/view.edit.php
Normal file
89
modules/EcmPrepaymentInvoices/views/EditView/view.edit.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?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-2010 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 EcmPrepaymentInvoices module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
class EcmPrepaymentInvoicesViewEdit extends ViewEdit {
|
||||
|
||||
function EcmPrepaymentInvoicesViewEdit(){
|
||||
parent::ViewEdit();
|
||||
}
|
||||
|
||||
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, 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl');
|
||||
|
||||
}
|
||||
function display() {
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user