|
From: <rc...@us...> - 2016-11-22 17:15:05
|
Revision: 7676
http://sourceforge.net/p/web-erp/reponame/7676
Author: rchacon
Date: 2016-11-22 17:15:03 +0000 (Tue, 22 Nov 2016)
Log Message:
-----------
Standardise text.
Modified Paths:
--------------
trunk/Z_ImportDebtors.php
trunk/Z_ImportSuppliers.php
trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo
trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po
trunk/sql/mysql/country_sql/default.sql
Modified: trunk/Z_ImportDebtors.php
===================================================================
--- trunk/Z_ImportDebtors.php 2016-11-21 14:55:36 UTC (rev 7675)
+++ trunk/Z_ImportDebtors.php 2016-11-22 17:15:03 UTC (rev 7676)
@@ -1,27 +1,28 @@
<?php
/* $Id: Z_ImportDebtors.php 6067 2013-07-10 02:04:22Z tehonu $*/
+/* Import debtors by csv file */
include('includes/session.inc');
$Title = _('Import Debtors And branches');
include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');
-if(isset($_POST['FormID'])){
- if(!isset($_POST['AutoDebtorNo'])){
+if(isset($_POST['FormID'])) {
+ if(!isset($_POST['AutoDebtorNo'])) {
$_POST['AutoDebtorNo']=0;
- }else{
+ } else {
$_POST['AutoDebtorNo']=1;
}
- if($_POST['AutoDebtorNo']==1){
+ if($_POST['AutoDebtorNo']==1) {
$_POST['UpdateIfExists']=0;
- }else{
- if(!isset($_POST['UpdateIfExists'])){
+ } else {
+ if(!isset($_POST['UpdateIfExists'])) {
$_POST['UpdateIfExists']=0;
- }else{
+ } else {
$_POST['UpdateIfExists']=1;
}
}
-}else{
+} else {
$_POST['AutoDebtorNo']=$_SESSION['AutoDebtorNo'];
$_POST['UpdateIfExists']=0;
}
@@ -86,7 +87,7 @@
'custbranchcode', //53
);
-if (isset($_FILES['userfile']) and $_FILES['userfile']['name']) { //start file processing
+if(isset($_FILES['userfile']) and $_FILES['userfile']['name']) { //start file processing
//initialize
$FieldTarget = count($FieldHeadings);
@@ -101,7 +102,7 @@
//get the header row
$headRow = fgetcsv($FileHandle, 10000, ",");
//check for correct number of fields
- if ( count($headRow) != count($FieldHeadings) ) {
+ if( count($headRow) != count($FieldHeadings) ) {
prnMsg (_('File contains '. count($headRow). ' columns, expected '. count($FieldHeadings). '. Try downloading a new template.'),'error');
fclose($FileHandle);
include('includes/footer.inc');
@@ -110,8 +111,8 @@
//test header row field name and sequence
$head = 0;
- foreach ($headRow as $headField) {
- if ( mb_strtoupper($headField) != mb_strtoupper($FieldHeadings[$head]) ) {
+ foreach($headRow as $headField) {
+ if( mb_strtoupper($headField) != mb_strtoupper($FieldHeadings[$head]) ) {
prnMsg (_('File contains incorrect headers ('. mb_strtoupper($headField). ' != '. mb_strtoupper($header[$head]). '. Try downloading a new template.'),'error');
fclose($FileHandle);
include('includes/footer.inc');
@@ -127,11 +128,11 @@
$row = 1;
$UpdatedNum=0;
$InsertNum=0;
- while ( ($filerow = fgetcsv($FileHandle, 10000, ",")) !== FALSE ) {
+ while( ($filerow = fgetcsv($FileHandle, 10000, ",")) !== FALSE ) {
//check for correct number of fields
$fieldCount = count($filerow);
- if ($fieldCount != $FieldTarget){
+ if($fieldCount != $FieldTarget) {
prnMsg (_($FieldTarget. ' fields required, '. $fieldCount. ' fields received'),'error');
fclose($FileHandle);
include('includes/footer.inc');
@@ -139,7 +140,7 @@
}
// cleanup the data (csv files often import with empty strings and such)
- foreach ($filerow as &$value) {
+ foreach($filerow as &$value) {
$value = trim($value);
}
@@ -175,9 +176,9 @@
$_POST['CustomerPOLine']=$filerow[29];
$_POST['typeid']=$filerow[30];
- if ($_POST['AutoDebtorNo']== 1) {
+ if($_POST['AutoDebtorNo']== 1) {
$_POST['DebtorNo'] = GetNextTransNo(500, $db);
- }else{
+ } else {
$_POST['DebtorNo'] = mb_strtoupper($_POST['DebtorNo']);
}
@@ -214,96 +215,96 @@
$_POST['SpecialInstructions']=$filerow[52];
$i=0;
- if ($_POST['AutoDebtorNo']==0 AND mb_strlen($_POST['DebtorNo']) ==0) {
+ if($_POST['AutoDebtorNo']==0 AND mb_strlen($_POST['DebtorNo']) ==0) {
$InputError = 1;
prnMsg( _('The debtor code cannot be empty'),'error');
$Errors[$i] = 'DebtorNo';
$i++;
- } elseif ($_POST['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) {
+ } elseif($_POST['AutoDebtorNo']==0 AND (ContainsIllegalCharacters($_POST['DebtorNo']) OR mb_strpos($_POST['DebtorNo'], ' '))) {
$InputError = 1;
prnMsg( _('The customer code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error');
$Errors[$i] = 'DebtorNo';
$i++;
}
- if (mb_strlen($_POST['CustName']) > 40 OR mb_strlen($_POST['CustName'])==0) {
+ if(mb_strlen($_POST['CustName']) > 40 OR mb_strlen($_POST['CustName'])==0) {
$InputError = 1;
prnMsg( _('The customer name must be entered and be forty characters or less long'),'error');
$Errors[$i] = 'CustName';
$i++;
- } elseif (mb_strlen($_POST['Address1']) >40) {
+ } elseif(mb_strlen($_POST['Address1']) >40) {
$InputError = 1;
prnMsg( _('The Line 1 of the address must be forty characters or less long'),'error');
$Errors[$i] = 'Address1';
$i++;
- } elseif (mb_strlen($_POST['Address2']) >40) {
+ } elseif(mb_strlen($_POST['Address2']) >40) {
$InputError = 1;
prnMsg( _('The Line 2 of the address must be forty characters or less long'),'error');
$Errors[$i] = 'Address2';
$i++;
- } elseif (mb_strlen($_POST['Address3']) >40) {
+ } elseif(mb_strlen($_POST['Address3']) >40) {
$InputError = 1;
prnMsg( _('The Line 3 of the address must be forty characters or less long'),'error');
$Errors[$i] = 'Address3';
$i++;
- } elseif (mb_strlen($_POST['Address4']) >50) {
+ } elseif(mb_strlen($_POST['Address4']) >50) {
$InputError = 1;
prnMsg( _('The Line 4 of the address must be fifty characters or less long'),'error');
$Errors[$i] = 'Address4';
$i++;
- } elseif (mb_strlen($_POST['Address5']) >20) {
+ } elseif(mb_strlen($_POST['Address5']) >20) {
$InputError = 1;
prnMsg( _('The Line 5 of the address must be twenty characters or less long'),'error');
$Errors[$i] = 'Address5';
$i++;
- } elseif (!is_numeric(filter_number_format($_POST['CreditLimit']))) {
+ } elseif(!is_numeric(filter_number_format($_POST['CreditLimit']))) {
$InputError = 1;
prnMsg( _('The credit limit must be numeric'),'error');
$Errors[$i] = 'CreditLimit';
$i++;
- } elseif (!is_numeric(filter_number_format($_POST['PymtDiscount']))) {
+ } elseif(!is_numeric(filter_number_format($_POST['PymtDiscount']))) {
$InputError = 1;
prnMsg( _('The payment discount must be numeric'),'error');
$Errors[$i] = 'PymtDiscount';
$i++;
- } elseif (!Is_Date($_POST['ClientSince'])) {
+ } elseif(!Is_Date($_POST['ClientSince'])) {
$InputError = 1;
prnMsg( _('The customer since field must be a date in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error');
$Errors[$i] = 'ClientSince';
$i++;
- } elseif (!is_numeric(filter_number_format($_POST['Discount']))) {
+ } elseif(!is_numeric(filter_number_format($_POST['Discount']))) {
$InputError = 1;
prnMsg( _('The discount percentage must be numeric'),'error');
$Errors[$i] = 'Discount';
$i++;
- } elseif (filter_number_format($_POST['CreditLimit']) <0) {
+ } elseif(filter_number_format($_POST['CreditLimit']) <0) {
$InputError = 1;
prnMsg( _('The credit limit must be a positive number'),'error');
$Errors[$i] = 'CreditLimit';
$i++;
- } elseif ((filter_number_format($_POST['PymtDiscount'])> 10) OR (filter_number_format($_POST['PymtDiscount']) <0)) {
+ } elseif((filter_number_format($_POST['PymtDiscount'])> 10) OR (filter_number_format($_POST['PymtDiscount']) <0)) {
$InputError = 1;
prnMsg( _('The payment discount is expected to be less than 10% and greater than or equal to 0'),'error');
$Errors[$i] = 'PymtDiscount';
$i++;
- } elseif ((filter_number_format($_POST['Discount'])> 100) OR (filter_number_format($_POST['Discount']) <0)) {
+ } elseif((filter_number_format($_POST['Discount'])> 100) OR (filter_number_format($_POST['Discount']) <0)) {
$InputError = 1;
prnMsg( _('The discount is expected to be less than 100% and greater than or equal to 0'),'error');
$Errors[$i] = 'Discount';
$i++;
}
- if (ContainsIllegalCharacters($_POST['EDIReference'])
+ if(ContainsIllegalCharacters($_POST['EDIReference'])
OR mb_strstr($_POST['EDIReference'],' ')) {
$InputError = 1;
prnMsg(_('The customers EDI reference code cannot contain any of the following characters') .' - \' & + \" ' . _('or a space'),'warn');
}
- if (mb_strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)){
+ if(mb_strlen($_POST['EDIReference'])<4 AND ($_POST['EDIInvoices']==1 OR $_POST['EDIOrders']==1)) {
$InputError = 1;
prnMsg(_('The customers EDI reference code must be set when EDI Invoices or EDI orders are activated'),'warn');
$Errors[$i] = 'EDIReference';
$i++;
}
- if (mb_strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1){
+ if(mb_strlen($_POST['EDIAddress'])<4 AND $_POST['EDIInvoices']==1) {
$InputError = 1;
prnMsg(_('The customers EDI email address or FTP server address must be entered if EDI Invoices are to be sent'),'warn');
$Errors[$i] = 'EDIAddress';
@@ -311,17 +312,17 @@
}
- if ($InputError !=1){
+ if($InputError !=1) {
$sql="SELECT 1 FROM debtorsmaster WHERE debtorno='".$_POST['DebtorNo']."' LIMIT 1";
$result=DB_query($sql);
$DebtorExists=(DB_num_rows($result)>0);
- if ($DebtorExists AND $_POST['UpdateIfExists']!=1) {
+ if($DebtorExists AND $_POST['UpdateIfExists']!=1) {
$UpdatedNum++;
- }else{
+ } else {
$SQL_ClientSince = FormatDateForSQL($_POST['ClientSince']);
- if ($DebtorExists) {//update
+ if($DebtorExists) {//update
$UpdatedNum++;
$sql = "SELECT 1
FROM debtortrans
@@ -329,16 +330,16 @@
$result = DB_query($sql);
$curr=false;
- if (DB_num_rows($result) == 0) {
+ if(DB_num_rows($result) == 0) {
$curr=true;
- }else{
+ } else {
$CurrSQL = "SELECT currcode
FROM debtorsmaster
where debtorno = '" . $_POST['DebtorNo'] . "'";
$CurrResult = DB_query($CurrSQL);
$CurrRow = DB_fetch_array($CurrResult);
$OldCurrency = $CurrRow[0];
- if ($OldCurrency != $_POST['CurrCode']) {
+ if($OldCurrency != $_POST['CurrCode']) {
prnMsg( _('The currency code cannot be updated as there are already transactions for this customer'),'info');
}
}
@@ -426,52 +427,52 @@
}
}
- }else{
+ } else {
break;
}
$i=0;
- if (ContainsIllegalCharacters($_POST['BranchCode']) OR mb_strstr($_POST['BranchCode'],' ')) {
+ if(ContainsIllegalCharacters($_POST['BranchCode']) OR mb_strstr($_POST['BranchCode'],' ')) {
$InputError = 1;
prnMsg(_('The Branch code cannot contain any of the following characters')." - & \' < >",'error');
$Errors[$i] = 'BranchCode';
$i++;
}
- if (mb_strlen($_POST['BranchCode'])==0) {
+ if(mb_strlen($_POST['BranchCode'])==0) {
$InputError = 1;
prnMsg(_('The Branch code must be at least one character long'),'error');
$Errors[$i] = 'BranchCode';
$i++;
}
- if (!is_numeric($_POST['FwdDate'])) {
+ if(!is_numeric($_POST['FwdDate'])) {
$InputError = 1;
prnMsg(_('The date after which invoices are charged to the following month is expected to be a number and a recognised number has not been entered'),'error');
$Errors[$i] = 'FwdDate';
$i++;
}
- if ($_POST['FwdDate'] >30) {
+ if($_POST['FwdDate'] >30) {
$InputError = 1;
prnMsg(_('The date (in the month) after which invoices are charged to the following month should be a number less than 31'),'error');
$Errors[$i] = 'FwdDate';
$i++;
}
- if (!is_numeric(filter_number_format($_POST['EstDeliveryDays']))) {
+ if(!is_numeric(filter_number_format($_POST['EstDeliveryDays']))) {
$InputError = 1;
prnMsg(_('The estimated delivery days is expected to be a number and a recognised number has not been entered'),'error');
$Errors[$i] = 'EstDeliveryDays';
$i++;
}
- if (filter_number_format($_POST['EstDeliveryDays']) >60) {
+ if(filter_number_format($_POST['EstDeliveryDays']) >60) {
$InputError = 1;
prnMsg(_('The estimated delivery days should be a number of days less than 60') . '. ' . _('A package can be delivered by seafreight anywhere in the world normally in less than 60 days'),'error');
$Errors[$i] = 'EstDeliveryDays';
$i++;
}
- if ($InputError !=1){
- if (DB_error_no() ==0) {
+ if($InputError !=1) {
+ if(DB_error_no() ==0) {
$sql = "SELECT 1
FROM custbranch
@@ -479,18 +480,18 @@
branchcode='".$_POST['BranchCode']."' LIMIT 1";
$result=DB_query($sql);
$BranchExists=(DB_num_rows($result)>0);
- if ($BranchExists AND $_POST['UpdateIfExists']!=1) {
+ if($BranchExists AND $_POST['UpdateIfExists']!=1) {
//do nothing
- }else{
+ } else {
- if (!isset($_POST['EstDeliveryDays'])) {
+ if(!isset($_POST['EstDeliveryDays'])) {
$_POST['EstDeliveryDays']=1;
}
- if (!isset($Latitude)) {
+ if(!isset($Latitude)) {
$Latitude=0.0;
$Longitude=0.0;
}
- if ($BranchExists) {
+ if($BranchExists) {
$sql = "UPDATE custbranch SET brname = '" . $_POST['BrName'] . "',
braddress1 = '" . $_POST['BrAddress1'] . "',
braddress2 = '" . $_POST['BrAddress2'] . "',
@@ -594,7 +595,7 @@
$result = DB_query($sql, $ErrMsg);
- if (DB_error_no() ==0) {
+ if(DB_error_no() ==0) {
prnMsg( _('New Item') .' ' . $StockID . ' '. _('has been added to the transaction'),'info');
} else { //location insert failed so set some useful error info
$InputError = 1;
@@ -608,29 +609,29 @@
}
- if ($InputError == 1) { //this row failed so exit loop
+ if($InputError == 1) { //this row failed so exit loop
break;
}
$row++;
}
- if ($InputError == 1) { //exited loop with errors so rollback
+ if($InputError == 1) { //exited loop with errors so rollback
prnMsg(_('Failed on row '. $row. '. Batch import has been rolled back.'),'error');
DB_Txn_Rollback();
} else { //all good so commit data transaction
DB_Txn_Commit();
prnMsg( _('Batch Import of') .' ' . $FileName . ' '. _('has been completed. All transactions committed to the database.'),'success');
- if($_POST['UpdateIfExists']==1){
- prnMsg( _('Updated:') .' ' . $UpdatedNum .' '._('Insert:'). $InsertNum );
- }else{
- prnMsg( _('Exist:') .' ' . $UpdatedNum .' '._('Insert:'). $InsertNum );
+ if($_POST['UpdateIfExists']==1) {
+ prnMsg( _('Updated:') .' ' . $UpdatedNum .' '._('Insert') . ':' . $InsertNum );
+ } else {
+ prnMsg( _('Exist:') .' ' . $UpdatedNum .' '. _('Insert') . ':' . $InsertNum );
}
}
fclose($FileHandle);
-} elseif ( isset($_POST['gettemplate']) || isset($_GET['gettemplate']) ) { //download an import template
+} elseif( isset($_POST['gettemplate']) || isset($_GET['gettemplate']) ) { //download an import template
echo '<br /><br /><br />"'. implode('","',$FieldHeadings). '"<br /><br /><br />';
Modified: trunk/Z_ImportSuppliers.php
===================================================================
--- trunk/Z_ImportSuppliers.php 2016-11-21 14:55:36 UTC (rev 7675)
+++ trunk/Z_ImportSuppliers.php 2016-11-22 17:15:03 UTC (rev 7676)
@@ -1,17 +1,18 @@
<?php
/* $Id: Z_ImportSuppliers.php 6067 2013-07-10 02:04:22Z tehonu $*/
+/* Import suppliers by csv file */
include('includes/session.inc');
$Title = _('Import Items');
include('includes/header.inc');
-if(isset($_POST['FormID'])){
- if(!isset($_POST['UpdateIfExists'])){
+if(isset($_POST['FormID'])) {
+ if(!isset($_POST['UpdateIfExists'])) {
$_POST['UpdateIfExists']=0;
- }else{
- $_POST['UpdateIfExists']=1;
+ } else {
+ $_POST['UpdateIfExists']=1;
}
-}else{
+} else {
$_POST['UpdateIfExists']=0;
}
// If this script is called with a file object, then the file contents are imported
@@ -45,7 +46,7 @@
'lng', //23
);
-if (isset($_FILES['userfile']) and $_FILES['userfile']['name']) { //start file processing
+if(isset($_FILES['userfile']) and $_FILES['userfile']['name']) { //start file processing
//initialize
$FieldTarget = count($FieldHeadings);
@@ -55,7 +56,7 @@
$FileName = $_FILES['userfile']['name'];
$TempName = $_FILES['userfile']['tmp_name'];
$FileSize = $_FILES['userfile']['size'];
-
+
//get file handle
$FileHandle = fopen($TempName, 'r');
@@ -63,7 +64,7 @@
$headRow = fgetcsv($FileHandle, 10000, ",");
//check for correct number of fields
- if ( count($headRow) != count($FieldHeadings) ) {
+ if( count($headRow) != count($FieldHeadings) ) {
prnMsg (_('File contains '. count($headRow). ' columns, expected '. count($FieldHeadings). '. Try downloading a new template.'),'error');
fclose($FileHandle);
include('includes/footer.inc');
@@ -72,8 +73,8 @@
//test header row field name and sequence
$head = 0;
- foreach ($headRow as $headField) {
- if ( mb_strtoupper($headField) != mb_strtoupper($FieldHeadings[$head]) ) {
+ foreach($headRow as $headField) {
+ if( mb_strtoupper($headField) != mb_strtoupper($FieldHeadings[$head]) ) {
prnMsg (_('File contains incorrect headers ('. mb_strtoupper($headField). ' != '. mb_strtoupper($header[$head]). '. Try downloading a new template.'),'error');
fclose($FileHandle);
include('includes/footer.inc');
@@ -89,10 +90,10 @@
$row = 1;
$UpdatedNum=0;
$InsertNum=0;
- while ( ($filerow = fgetcsv($FileHandle, 10000, ",")) !== FALSE ) {
+ while( ($filerow = fgetcsv($FileHandle, 10000, ",")) !== FALSE ) {
//check for correct number of fields
$fieldCount = count($filerow);
- if ($fieldCount != $FieldTarget){
+ if($fieldCount != $FieldTarget) {
prnMsg (_($FieldTarget. ' fields required, '. $fieldCount. ' fields received'),'error');
fclose($FileHandle);
include('includes/footer.inc');
@@ -100,7 +101,7 @@
}
// cleanup the data (csv files often import with empty strings and such)
- foreach ($filerow as &$value) {
+ foreach($filerow as &$value) {
$value = trim($value);
}
@@ -133,7 +134,7 @@
/* actions to take once the user has clicked the submit button
ie the page has called itself with some user input */
- if (mb_strlen(trim($_POST['SuppName'])) > 40
+ if(mb_strlen(trim($_POST['SuppName'])) > 40
OR mb_strlen(trim($_POST['SuppName'])) == 0
OR trim($_POST['SuppName']) == '') {
@@ -142,56 +143,56 @@
$Errors[$i]='Name';
$i++;
}
- if (mb_strlen($SupplierID) == 0) {
+ if(mb_strlen($SupplierID) == 0) {
$InputError = 1;
prnMsg(_('The Supplier Code cannot be empty'),'error');
$Errors[$i]='ID';
$i++;
}
- if (ContainsIllegalCharacters($SupplierID)) {
+ if(ContainsIllegalCharacters($SupplierID)) {
$InputError = 1;
prnMsg(_('The supplier code cannot contain any of the illegal characters') ,'error');
$Errors[$i]='ID';
$i++;
}
- if (mb_strlen($_POST['Phone']) >25) {
+ if(mb_strlen($_POST['Phone']) >25) {
$InputError = 1;
prnMsg(_('The telephone number must be 25 characters or less long'),'error');
$Errors[$i] = 'Telephone';
$i++;
}
- if (mb_strlen($_POST['Fax']) >25) {
+ if(mb_strlen($_POST['Fax']) >25) {
$InputError = 1;
prnMsg(_('The fax number must be 25 characters or less long'),'error');
$Errors[$i] = 'Fax';
$i++;
}
- if (mb_strlen($_POST['Email']) >55) {
+ if(mb_strlen($_POST['Email']) >55) {
$InputError = 1;
prnMsg(_('The email address must be 55 characters or less long'),'error');
$Errors[$i] = 'Email';
$i++;
}
- if (mb_strlen($_POST['Email'])>0 AND !IsEmailAddress($_POST['Email'])) {
+ if(mb_strlen($_POST['Email'])>0 AND !IsEmailAddress($_POST['Email'])) {
$InputError = 1;
prnMsg(_('The email address is not correctly formed'),'error');
$Errors[$i] = 'Email';
$i++;
}
- if (mb_strlen($_POST['BankRef']) > 12) {
+ if(mb_strlen($_POST['BankRef']) > 12) {
$InputError = 1;
prnMsg(_('The bank reference text must be less than 12 characters long'),'error');
$Errors[$i]='BankRef';
$i++;
}
- if (!Is_Date($_POST['SupplierSince'])) {
+ if(!Is_Date($_POST['SupplierSince'])) {
$InputError = 1;
prnMsg(_('The supplier since field must be a date in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error');
$Errors[$i]='SupplierSince';
$i++;
}
- if ($InputError != 1){
+ if($InputError != 1) {
$SQL_SupplierSince = FormatDateForSQL($_POST['SupplierSince']);
@@ -202,9 +203,9 @@
$SuppExists = ($myrow[0]>0);
- if ($SuppExists AND $_POST['UpdateIfExists']!=1) {
+ if($SuppExists AND $_POST['UpdateIfExists']!=1) {
$UpdatedNum++;
- }elseif($SuppExists){
+ }elseif($SuppExists) {
$UpdatedNum++;
$supptranssql = "SELECT supplierno
FROM supptrans
@@ -229,7 +230,7 @@
fax = '". $_POST['Fax']."',
email = '" . $_POST['Email'] . "',
supptype = '".$_POST['SupplierType']."',";
- if ($supptrans == 0)$sql.="currcode='" . $_POST['CurrCode'] . "',";
+ if($supptrans == 0)$sql.="currcode='" . $_POST['CurrCode'] . "',";
$sql.="suppliersince='".$SQL_SupplierSince . "',
paymentterms='" . $_POST['PaymentTerms'] . "',
bankpartics='" . $_POST['BankPartics'] . "',
@@ -242,11 +243,11 @@
lng='" . $longitude ."',
taxref='". $_POST['TaxRef'] ."'
WHERE supplierid = '".$SupplierID."'";
-
- if ($suppcurr[0] != $_POST['CurrCode']) {
+
+ if($suppcurr[0] != $_POST['CurrCode']) {
prnMsg( _('Cannot change currency code as transactions already exist'), 'info');
}
-
+
$ErrMsg = _('The supplier could not be updated because');
$DbgMsg = _('The SQL that was used to update the supplier but failed was');
// echo $sql;
@@ -309,7 +310,7 @@
$result = DB_query($sql, $ErrMsg, $DbgMsg);
}
- if (DB_error_no() ==0) {
+ if(DB_error_no() ==0) {
} else { //location insert failed so set some useful error info
$InputError = 1;
@@ -317,7 +318,7 @@
} else { //item insert failed so set some useful error info
$InputError = 1;
}
- if ($InputError == 1) { //this row failed so exit loop
+ if($InputError == 1) { //this row failed so exit loop
break;
}
@@ -325,30 +326,30 @@
}
- if ($InputError == 1) { //exited loop with errors so rollback
+ if($InputError == 1) { //exited loop with errors so rollback
prnMsg(_('Failed on row '. $row. '. Batch import has been rolled back.'),'error');
DB_Txn_Rollback();
} else { //all good so commit data transaction
DB_Txn_Commit();
prnMsg( _('Batch Import of') .' ' . $FileName . ' '. _('has been completed. All transactions committed to the database.'),'success');
- if($_POST['UpdateIfExists']==1){
- prnMsg( _('Updated:') .' ' . $UpdatedNum .' '._('Insert:'). $InsertNum );
- }else{
- prnMsg( _('Exist:') .' ' . $UpdatedNum .' '._('Insert:'). $InsertNum );
+ if($_POST['UpdateIfExists']==1) {
+ prnMsg( _('Updated:') .' ' . $UpdatedNum .' '. _('Insert') . ':' . $InsertNum );
+ } else {
+ prnMsg( _('Exist:') .' ' . $UpdatedNum .' '. _('Insert') . ':' . $InsertNum );
}
}
fclose($FileHandle);
-} elseif ( isset($_POST['gettemplate']) || isset($_GET['gettemplate']) ) { //download an import template
+} elseif( isset($_POST['gettemplate']) || isset($_GET['gettemplate']) ) { //download an import template
echo '<br /><br /><br />"'. implode('","',$FieldHeadings). '"<br /><br /><br />';
} else { //show file upload form
prnMsg(_('Please ensure that your csv file charset is UTF-8, otherwise the data will not store correctly in database'),'warn');
-
+
echo '
<br />
<a href="Z_ImportSuppliers.php?gettemplate=1">Get Import Template</a>
Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po
===================================================================
--- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2016-11-21 14:55:36 UTC (rev 7675)
+++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2016-11-22 17:15:03 UTC (rev 7676)
@@ -8,7 +8,7 @@
"Project-Id-Version: webERP 4.12.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-20 17:14-0600\n"
-"PO-Revision-Date: 2016-11-21 07:31-0600\n"
+"PO-Revision-Date: 2016-11-22 11:01-0600\n"
"Last-Translator: Rafael E. Chacón <raf...@gm...>\n"
"Language-Team: TecnoSoluciones.com <web...@te...>\n"
"Language: es_ES\n"
@@ -3777,7 +3777,7 @@
#: BankReconciliation.php:208
msgid "Add back unpresented cheques"
-msgstr "Sumar cheques no cobrados"
+msgstr "Añadir cheques no cobrados"
#: BankReconciliation.php:214 BankReconciliation.php:291 CustWhereAlloc.php:135
#: CustomerAccount.php:251 CustomerAllocations.php:347
@@ -9476,11 +9476,11 @@
#: CustomerAllocations.php:340
msgid "Allocate Receipt"
-msgstr "Asignar Cobro"
+msgstr "Asignar cobro"
#: CustomerAllocations.php:340 CustomerReceipt.php:594
msgid "Allocate Receipts"
-msgstr "Asignar Cobros"
+msgstr "Asignar cobros"
#: CustomerAllocations.php:344 PDFRemittanceAdvice.php:307
#: SupplierAllocations.php:566 SupplierAllocations.php:641
@@ -13080,7 +13080,7 @@
#: Factors.php:256
msgid "Insert New Factor"
-msgstr "Agregar la Nueva Compañía Financiera"
+msgstr "Insertar compañía de factoreo nueva"
#: Factors.php:263
msgid "Update Factor"
@@ -13770,7 +13770,7 @@
#: FixedAssetItems.php:679
msgid "Insert New Fixed Asset"
-msgstr "Insertar Nuevo activo fijo"
+msgstr "Insertar activo fijo nuevo"
#: FixedAssetItems.php:685
msgid ""
@@ -14342,7 +14342,7 @@
#: GLAccountCSV.php:79 GLAccountInquiry.php:90 GLAccountReport.php:282
msgid "All tags"
-msgstr "Todos los Centros de Costo"
+msgstr "Todos los centros de costo"
#: GLAccountCSV.php:91 SalesAnalRepts.php:306
#, php-format
@@ -15598,7 +15598,7 @@
#: GLTags.php:70 SecurityTokens.php:154
msgid "Insert"
-msgstr "Crear"
+msgstr "Insertar"
#: GLTags.php:81
msgid "Tag ID"
@@ -22334,7 +22334,7 @@
#: PO_Items.php:1164 SelectProduct.php:477 SelectProduct.php:515
#: StockClone.php:1116 Stocks.php:1445
msgid "Insert New Item"
-msgstr "Agregar nuevo artículo"
+msgstr "Insertar artículo nuevo"
#: PO_Items.php:1169
msgid "Order a non stock item"
@@ -27050,7 +27050,7 @@
#: SalesAnalReptCols.php:515 SalesAnalReptCols.php:517
msgid "Add to"
-msgstr "Sumar a"
+msgstr "Añadir a"
#: SalesAnalReptCols.php:520 SalesAnalReptCols.php:522
msgid "Numerator Minus Denominator"
@@ -31394,7 +31394,7 @@
#: StockAdjustmentsControlled.php:56
msgid "Adding Items"
-msgstr "Agregando Artículos"
+msgstr "Añadiendo artículos"
#: StockAdjustmentsControlled.php:61
msgid "Removing Items"
@@ -36568,7 +36568,7 @@
#: Suppliers.php:859
msgid "Insert New Supplier"
-msgstr "Inserte nuevo proveedor"
+msgstr "Insertar proveedor nuevo"
#: Suppliers.php:953 Suppliers.php:957 Suppliers.php:961
msgid "Within 40 characters"
@@ -41406,7 +41406,7 @@
#: Z_ChangeLocationCode.php:61
msgid "Adding the new location record"
-msgstr "Agregando registro de nueva localidad"
+msgstr "Añadiendo registro de nueva localidad"
#: Z_ChangeLocationCode.php:107
msgid "The SQL to insert the new location record failed"
@@ -41648,7 +41648,7 @@
#: Z_ChangeStockCategory.php:51
msgid "Adding the new stock Category record"
-msgstr "Agregar la nueva categoría del registro de la ubicación de productos"
+msgstr "Añadiendo la nueva categoría del registro de la ubicación de productos"
#: Z_ChangeStockCategory.php:75
msgid "The SQL to insert the new stock category record failed"
@@ -41744,7 +41744,7 @@
#: Z_ChangeStockCode.php:56
msgid "Adding the new stock master record"
-msgstr "Agregando nuevo registro maestro de existencias"
+msgstr "Añadiendo nuevo registro maestro de existencias"
#: Z_ChangeStockCode.php:113
msgid "The SQL to insert the new stock master record failed"
@@ -42748,7 +42748,7 @@
#: Z_ImportChartOfAccounts.php:111
msgid "All general ledger accounts have been added to the chart of accounts"
-msgstr ""
+msgstr "Todas las cuentas contables se han añadido al catálogo contable"
#: Z_ImportChartOfAccounts.php:124
msgid ""
@@ -42930,7 +42930,7 @@
#: Z_ImportCustbranch.php:513
msgid "Insert branches total:"
-msgstr ""
+msgstr "Insertar total de sucursales:"
#: Z_ImportCustbranch.php:515
msgid "Exist branches total:"
@@ -42970,7 +42970,7 @@
#: Z_ImportDebtors.php:625 Z_ImportDebtors.php:627 Z_ImportSuppliers.php:335
#: Z_ImportSuppliers.php:337
msgid "Insert:"
-msgstr ""
+msgstr "Insertar:"
#: Z_ImportDebtors.php:627 Z_ImportSuppliers.php:337
msgid "Exist:"
@@ -46281,7 +46281,7 @@
#: api/api_xml-rpc.php:1218
msgid "Insert Sales Order Header"
-msgstr "Insertar el Encabezado de Pedidos de Venta"
+msgstr "Insertar encabezado de orden de venta"
#: api/api_xml-rpc.php:1222
msgid ""
@@ -46333,7 +46333,7 @@
#: api/api_xml-rpc.php:1316
msgid "Insert Sales Order Line"
-msgstr "Inserte la Línea de Pedidos de Venta"
+msgstr "Insertar línea de orden de ventas"
#: api/api_xml-rpc.php:1320
msgid "The orderno key must be one of these values. "
@@ -50974,7 +50974,7 @@
#: includes/MainMenuLinksArray.php:441
msgid "Add or Maintain Asset Locations"
-msgstr "Agregar o Administrar Ubicaciones de activos"
+msgstr "Añadir o Administrar Ubicaciones de activos"
#: includes/MainMenuLinksArray.php:448
msgid "Assign Cash to PC Tab"
@@ -51615,7 +51615,7 @@
#: install/index.php:1070
msgid "Administrator account settings"
-msgstr ""
+msgstr "Configuración de la cuenta del administrador"
#: install/index.php:1074
msgid "The default user name is 'admin' and it cannot be changed."
@@ -52077,7 +52077,7 @@
#: reportwriter/languages/en_US/reports.php:164
msgid "Administrator Page"
-msgstr ""
+msgstr "Página del administrador"
#: reportwriter/languages/en_US/reports.php:165
msgid "Border Line"
Modified: trunk/sql/mysql/country_sql/default.sql
===================================================================
--- trunk/sql/mysql/country_sql/default.sql 2016-11-21 14:55:36 UTC (rev 7675)
+++ trunk/sql/mysql/country_sql/default.sql 2016-11-22 17:15:03 UTC (rev 7676)
@@ -7133,6 +7133,7 @@
INSERT INTO `scripts` VALUES ('Z_ImportPartCodes.php',11,'Allows inventory items to be imported from a csv');
INSERT INTO `scripts` VALUES ('Z_ImportPriceList.php',15,'Loads a new price list from a csv file');
INSERT INTO `scripts` VALUES ('Z_ImportStocks.php',15,'');
+INSERT INTO `scripts` VALUES ('Z_ImportSuppliers.php',15,'Import suppliers by csv file');
INSERT INTO `scripts` VALUES ('Z_index.php',15,'Utility menu page');
INSERT INTO `scripts` VALUES ('Z_ItemsWithoutPicture.php',15,'Shows the list of curent items without picture in webERP');
INSERT INTO `scripts` VALUES ('Z_MakeLocUsers.php',15,'Create User Location records');
|