This commit is contained in:
florian HENRY 2018-01-10 20:49:48 +01:00
commit c8c550cd33
6 changed files with 13 additions and 12 deletions

View File

@ -785,7 +785,8 @@ if ($resql)
Facture::TYPE_STANDARD=>$langs->trans("InvoiceStandard"),
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
Facture::TYPE_SITUATION=>$langs->trans("InvoiceSituation"),
);
//$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order.
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100');

View File

@ -171,16 +171,15 @@ if (($action == 'create' || $action == 'add') && ! $error) {
if ($ret < 0) $error++;
if ($_POST['origin'] && $_POST['originid']) {
$object->linked_objects = $orders_id;
$linked_orders_ids=array();
foreach ( $orders_id as $origin => $origin_id ) {
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
$linked_orders_ids[]=$origin_id;
}
$object->linked_objects = array(GETPOST('origin')=>$linked_orders_ids);
$id = $object->create($user);
if ($id > 0) {
foreach ( $orders_id as $origin => $origin_id ) {
$origin_id = (! empty($origin_id) ? $origin_id : $orders_id[$ii]);
$object->add_object_linked(GETPOST('origin'), $origin_id);
}
while ( $ii < $nn ) {
$objectsrc = new CommandeFournisseur($db);
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");

View File

@ -102,6 +102,8 @@ function test_sql_and_script_inject($val, $type)
$inj += preg_match('/onerror\s*=/i', $val); // onerror can be set on img or any html tag like <img title='...' onerror = alert(1)>
$inj += preg_match('/onfocus\s*=/i', $val); // onfocus can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
$inj += preg_match('/onload\s*=/i', $val); // onload can be set on input text html tag like <input type='text' value='...' onfocus = alert(1)>
$inj += preg_match('/onclick\s*=/i', $val); // onclick can be set on img text html tag like <img onclick = alert(1)>
$inj += preg_match('/onscroll\s*=/i', $val); // onscroll can be textarea
if ($type == 1)
{
$inj += preg_match('/javascript:/i', $val);

View File

@ -57,7 +57,6 @@ $select_pricing_rules=array(
);
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{
$langs->load("admin");
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY'] = $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')'; // TODO If this is enabled, price must be hidden when price by qty is enabled, also price for quantity must be used when adding product into order/propal/invoice
$select_pricing_rules['PRODUIT_CUSTOMER_PRICES_BY_QTY&PRODUIT_MULTIPRICES'] = $langs->trans('MultiPricesAbility') . '+' . $langs->trans('PriceByQuantity').' ('.$langs->trans("VersionExperimental").')';
}

View File

@ -73,7 +73,7 @@ if ($action == 'convert')
{
$vat_src_code_old = $reg[1];
$oldvatrateclean = preg_replace('/\s*\(.*\)/', '', $oldvatrate); // Remove code into vatrate.
}
} else $oldvatrateclean=$oldvatrate;
// Clean vat code new
$vat_src_code_new='';
@ -81,7 +81,7 @@ if ($action == 'convert')
{
$vat_src_code_new = $reg[1];
$newvatrateclean = preg_replace('/\s*\(.*\)/', '', $newvatrate); // Remove code into vatrate.
}
} else $newvatrateclean=$newvatrate;
// If country to edit is my country, so we change customer prices
if ($country_id == $mysoc->country_id)

View File

@ -821,7 +821,7 @@ else
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
{
$htmltext=$product_fourn->display_price_product_fournisseur(1, 1, 0, 1);
print $form->textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext);
print $form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent/100) + $product_fourn->fourn_unitcharges - $product_fourn->fourn_remise).' '.$langs->trans("HT"),$htmltext);
}
else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
}