Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6764d36434
@ -60,7 +60,7 @@ if (! $sortfield) $sortfield="p.rowid";
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("ListPayment"));
|
||||
llxHeader('', $langs->trans('ListPayment'));
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
// Copyright (C) 2009-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@ -19,23 +19,29 @@
|
||||
// \brief File that include javascript functions for croping feature
|
||||
//
|
||||
|
||||
/* Enable jcrop plugin onto id cropbox */
|
||||
jQuery(function() {
|
||||
jQuery('#cropbox').Jcrop({
|
||||
onSelect: updateCoords,
|
||||
onChange: updateCoords
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/* Update fields that store new size */
|
||||
function updateCoords(c)
|
||||
{
|
||||
jQuery('#x').val(c.x);
|
||||
jQuery('#y').val(c.y);
|
||||
jQuery('#x2').val(c.x2);
|
||||
jQuery('#y2').val(c.y2);
|
||||
jQuery('#w').val(c.w);
|
||||
jQuery('#h').val(c.h);
|
||||
//alert(parseInt(jQuery("#ratioforcrop").val()));
|
||||
ratio=1;
|
||||
if (parseInt(jQuery("#ratioforcrop").val()) > 0) ratio = parseInt(jQuery("#ratioforcrop").val());
|
||||
jQuery('#x').val(Math.ceil(c.x * ratio));
|
||||
jQuery('#y').val(Math.ceil(c.y * ratio));
|
||||
jQuery('#x2').val(Math.ceil(c.x2 * ratio));
|
||||
jQuery('#y2').val(Math.ceil(c.y2 * ratio));
|
||||
jQuery('#w').val(Math.ceil(c.w * ratio));
|
||||
jQuery('#h').val(Math.ceil(c.h * ratio));
|
||||
};
|
||||
|
||||
/* checkCoords */
|
||||
function checkCoords()
|
||||
{
|
||||
if (parseInt(jQuery('#w').val())) return true;
|
||||
|
||||
@ -128,11 +128,8 @@ if ($mesg) print '<div class="error">'.$mesg.'</div>';
|
||||
$infoarray=dol_getImageSize($dir."/".urldecode($_GET["file"]));
|
||||
$height=$infoarray['height'];
|
||||
$width=$infoarray['width'];
|
||||
print $langs->trans("CurrentInformationOnImage").':';
|
||||
print '<ul>
|
||||
<li>'.$langs->trans("Width").': '.$width.' px</li>
|
||||
<li>'.$langs->trans("Height").': '.$height.' px</li>
|
||||
</ul>';
|
||||
print $langs->trans("CurrentInformationOnImage").': ';
|
||||
print $langs->trans("Width").': <strong>'.$width.'</strong> x '.$langs->trans("Height").': <strong>'.$height.'</strong><br>';
|
||||
|
||||
print '<br>'."\n";
|
||||
|
||||
@ -142,55 +139,66 @@ print '<form name="redim_file" action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" meth
|
||||
print '<fieldset id="redim_file">';
|
||||
print '<legend>'.$langs->trans("Resize").'</legend>';
|
||||
print $langs->trans("ResizeDesc").'<br>';
|
||||
print $langs->trans("NewLength").': <input class="flat" name="sizex" size="10" type="text" > px <br> ';
|
||||
print $langs->trans("NewLength").': <input class="flat" name="sizex" size="10" type="text" > px '.$langs->trans("or").' ';
|
||||
print $langs->trans("NewHeight").': <input class="flat" name="sizey" size="10" type="text" > px <br>';
|
||||
print '<input type="hidden" name="file" value="'.$_GET['file'].'" />';
|
||||
print '<input type="hidden" name="action" value="confirm_resize" />';
|
||||
print '<input type="hidden" name="product" value="'.$id.'" />';
|
||||
print '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
print '<br><input class="button" name="sendit" value="'.dol_escape_htmltag($langs->trans("Resize")).'" type="submit" />';
|
||||
print '</fieldset>';
|
||||
print '<br></form>';
|
||||
print '</fieldset>'."\n";
|
||||
print '</form>';
|
||||
print '<br>'."\n";
|
||||
|
||||
/*
|
||||
* Recadrage d'une image
|
||||
* Crop image
|
||||
*/
|
||||
|
||||
print '<br>'."\n";
|
||||
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
|
||||
$infoarray=dol_getImageSize($dir."/".urldecode($_GET["file"]));
|
||||
$height=$infoarray['height'];
|
||||
$width=$infoarray['width'];
|
||||
|
||||
print '<!-- Form to crop -->'."\n";
|
||||
print '<fieldset id="redim_file">';
|
||||
print '<legend>'.$langs->trans("Recenter").'</legend>';
|
||||
print $langs->trans("DefineNewAreaToPick").'...<br>';
|
||||
print '<br><center>';
|
||||
print '<div style="border: 1px solid #888888; width: '.$width.'px;"><img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$object->entity.'&file='.$original_file.'" alt="" id="cropbox" /></div>';
|
||||
print '</center><br>';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post" onsubmit="return checkCoords();">
|
||||
<div class="jc_coords">
|
||||
'.$langs->trans("NewSizeAfterCropping").':
|
||||
<label>X1 <input type="text" size="4" id="x" name="x" /></label>
|
||||
<label>Y1 <input type="text" size="4" id="y" name="y" /></label>
|
||||
<label>X2 <input type="text" size="4" id="x2" name="x2" /></label>
|
||||
<label>Y2 <input type="text" size="4" id="y2" name="y2" /></label>
|
||||
<label>W <input type="text" size="4" id="w" name="w" /></label>
|
||||
<label>H <input type="text" size="4" id="h" name="h" /></label>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="file" name="file" value="'.urlencode($original_file).'" />
|
||||
<input type="hidden" id="action" name="action" value="confirm_crop" />
|
||||
<input type="hidden" id="product" name="product" value="'.$id.'" />
|
||||
<input type="hidden" name="id" value="'.$id.'" />
|
||||
<br><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Recenter")).'" />
|
||||
</form>';
|
||||
print '</fieldset>';
|
||||
|
||||
$infoarray=dol_getImageSize($dir."/".urldecode($_GET["file"]));
|
||||
$height=$infoarray['height'];
|
||||
$width=$infoarray['width'];
|
||||
$widthforcrop=$width; $refsizeforcrop='orig'; $ratioforcrop=1;
|
||||
if (! empty($_SESSION['dol_screenwidth']) && ($widthforcrop > round($_SESSION['dol_screenwidth']/2)))
|
||||
{
|
||||
$widthforcrop=min(round($_SESSION['dol_screenwidth']/2),$widthforcrop);
|
||||
$refsizeforcrop='screenwidth';
|
||||
$ratioforcrop=2;
|
||||
}
|
||||
|
||||
print '<!-- Form to crop -->'."\n";
|
||||
print '<fieldset id="redim_file">';
|
||||
print '<legend>'.$langs->trans("Recenter").'</legend>';
|
||||
print $langs->trans("DefineNewAreaToPick").'...<br>';
|
||||
print '<br><center>';
|
||||
print '<div style="border: 1px solid #888888; width: '.$widthforcrop.'px;">';
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$object->entity.'&file='.$original_file.'" alt="" id="cropbox" width="'.$widthforcrop.'px"/>';
|
||||
print '</div>';
|
||||
print '</center><br>';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post" onsubmit="return checkCoords();">
|
||||
<div class="jc_coords">
|
||||
'.$langs->trans("NewSizeAfterCropping").':
|
||||
<label>X1 <input type="text" size="4" id="x" name="x" /></label>
|
||||
<label>Y1 <input type="text" size="4" id="y" name="y" /></label>
|
||||
<label>X2 <input type="text" size="4" id="x2" name="x2" /></label>
|
||||
<label>Y2 <input type="text" size="4" id="y2" name="y2" /></label>
|
||||
<label>W <input type="text" size="4" id="w" name="w" /></label>
|
||||
<label>H <input type="text" size="4" id="h" name="h" /></label>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="file" name="file" value="'.urlencode($original_file).'" />
|
||||
<input type="hidden" id="action" name="action" value="confirm_crop" />
|
||||
<input type="hidden" id="product" name="product" value="'.$id.'" />
|
||||
<input type="hidden" id="refsizeforcrop" name="refsizeforcrop" value="'.$refsizeforcrop.'" />
|
||||
<input type="hidden" id="ratioforcrop" name="ratioforcrop" value="'.$ratioforcrop.'" />
|
||||
<input type="hidden" name="id" value="'.$id.'" />
|
||||
<br><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Recenter")).'" />
|
||||
</form>'."\n";
|
||||
print '</fieldset>'."\n";
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ require DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
$langs->load('companies');
|
||||
$langs->load('bills');
|
||||
$langs->load('banks');
|
||||
$langs->load('compta');
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$confirm = GETPOST('confirm');
|
||||
@ -232,7 +233,7 @@ if ($action == 'confirm_paiement' && $confirm == 'yes')
|
||||
$supplierstatic=new Societe($db);
|
||||
$invoicesupplierstatic = new FactureFournisseur($db);
|
||||
|
||||
llxHeader();
|
||||
llxHeader('',$langs->trans('ListPayment'));
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
@ -1092,3 +1092,14 @@ create table llx_categories_extrafields
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_categories_extrafields ADD INDEX idx_categories_extrafields (fk_object);
|
||||
|
||||
update llx_product set barcode = null where barcode in ('', '-1', '0');
|
||||
update llx_societe set barcode = null where barcode in ('', '-1', '0');
|
||||
|
||||
-- Add missing unique keys
|
||||
ALTER TABLE llx_product ADD INDEX idx_product_barcode (barcode);
|
||||
ALTER TABLE llx_product ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_barcode (barcode);
|
||||
ALTER TABLE llx_societe ADD UNIQUE INDEX uk_societe_barcode (barcode, fk_barcode_type, entity);
|
||||
|
||||
|
||||
|
||||
@ -108,16 +108,21 @@ update llx_opensurvey_sondage set format = 'A' where format = 'A+';
|
||||
-- ALTER TABLE llx_facture_fourn ALTER COLUMN fk_cond_reglement DROP NOT NULL;
|
||||
|
||||
|
||||
-- Sequence to removed duplicated values of barcode. Use serveral times if you still have duplicate.
|
||||
create table tmp_product as (select * from llx_product);
|
||||
select barcode, max(rowid) from tmp_product where barcode is not null group by barcode having count(rowid) >= 2;
|
||||
update llx_product set barcode = null where barcode is not null and (barcode, rowid) in (select barcode, max(rowid) from tmp_product where barcode is not null group by barcode having count(rowid) >= 2);
|
||||
drop table tmp_product;
|
||||
update llx_product set barcode = null where barcode in ('', '-1', '0');
|
||||
update llx_societe set barcode = null where barcode in ('', '-1', '0');
|
||||
|
||||
-- Sequence to removed duplicated values of barcode. Use serveral times if you still have duplicate.
|
||||
create table tmp_societe as (select * from llx_societe);
|
||||
select barcode, max(rowid) from tmp_societe where barcode is not null group by barcode having count(rowid) >= 2;
|
||||
update llx_societe set barcode = null where barcode is not null and (barcode, rowid) in (select barcode, max(rowid) from tmp_societe where barcode is not null group by barcode having count(rowid) >= 2);
|
||||
drop table tmp_societe;
|
||||
-- Sequence to removed duplicated values of barcode in llx_product. Use serveral times if you still have duplicate.
|
||||
--select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2;
|
||||
create table tmp_product_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2);
|
||||
--select * from tmp_product_double;
|
||||
update llx_product set barcode = null where (rowid, barcode) in (select max_rowid, barcode from tmp_product_double);
|
||||
drop table tmp_product_double;
|
||||
|
||||
-- Sequence to removed duplicated values of barcode in llx_societe. Use serveral times if you still have duplicate.
|
||||
--select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2;
|
||||
create table tmp_societe_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2);
|
||||
--select * from tmp_societe_double;
|
||||
update llx_societe set barcode = null where (rowid, barcode) in (select max_rowid, barcode from tmp_societe_double);
|
||||
drop table tmp_societe_double;
|
||||
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ ConfirmDeletePayment=Êtes-vous sûr de vouloir supprimer ce paiement ?
|
||||
ConfirmConvertToReduc=Voulez-vous convertir cet avoir ou acompte en réduction future ?<br>Le montant sera alors stocké en réduction fixe en attente pour le client. Cette dernière pourra être utilisée pour réduire le montant d'une facture en cours ou prochaine de ce client.
|
||||
SupplierPayments=Règlements fournisseurs
|
||||
ReceivedPayments=Règlements reçus
|
||||
ReceivedCustomersPayments=Règlements reçus du client
|
||||
ReceivedCustomersPayments=Règlements reçus des clients
|
||||
PayedSuppliersPayments=Paiements aux fournisseurs
|
||||
ReceivedCustomersPaymentsToValid=Règlements clients reçus à valider
|
||||
PaymentsReportsForYear=Rapports de règlements pour %s
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
@ -162,7 +162,7 @@ if ($object->id)
|
||||
{
|
||||
// Affiche formulaire upload
|
||||
$formfile=new FormFile($db);
|
||||
$formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("AddPhoto"), 1, 0, 1, 50, $object, '', false); // ajax=false for the moment. true may not work.
|
||||
$formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("AddPhoto"), 1, 0, ($user->rights->produit->creer || $user->rights->service->creer), 50, $object, '', false, '', 0); // ajax=false for the moment. true may not work.
|
||||
}
|
||||
|
||||
// Affiche photos
|
||||
|
||||
Loading…
Reference in New Issue
Block a user