Example #1
0
 print '<tr>';
 print '<td>' . $langs->trans('Product') . '</td>';
 print '<td>';
 print $form->select_produits('', 'prodid', '', 0);
 print '</td>';
 print '</tr>';
 // VAT
 print '<tr><td>' . $langs->trans("VATRate") . '</td><td>';
 print $form->load_tva("tva_tx", $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr);
 print '</td></tr>';
 // Price base
 print '<tr><td width="15%">';
 print $langs->trans('PriceBase');
 print '</td>';
 print '<td>';
 print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
 print '</td>';
 print '</tr>';
 // Price
 print '<tr><td width="20%">';
 $text = $langs->trans('SellingPrice');
 print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
 print '</td><td>';
 if ($object->price_base_type == 'TTC') {
     print '<input name="price" size="10" value="' . price($object->price_ttc) . '">';
 } else {
     print '<input name="price" size="10" value="' . price($object->price) . '">';
 }
 print '</td></tr>';
 // Price minimum
 print '<tr><td>';
Example #2
0
							window.location = "' . DOL_URL_ROOT . '/product/dynamic_price/editor.php?id=' . $id . '&tab=fournisseurs&eid=" + $("#eid").attr("value");
						}
						function on_change() {
							if ($("#eid").attr("value") == 0) {
								jQuery("#price_numeric").show();
							} else {
								jQuery("#price_numeric").hide();
							}
						}
					</script>';
                }
                // Price qty min
                print '<tr><td class="fieldrequired">' . $langs->trans("PriceQtyMin") . '</td>';
                print '<td><input class="flat" name="price" size="8" value="' . (GETPOST('price') ? price(GETPOST('price')) : (isset($object->fourn_price) ? price($object->fourn_price) : '')) . '">';
                print '&nbsp;';
                print $form->selectPriceBaseType(GETPOST('price_base_type') ? GETPOST('price_base_type') : 'HT', "price_base_type");
                // We keep 'HT' here, price_base_type is not yet supported for supplier prices
                print '</td></tr>';
                // Discount qty min
                print '<tr><td>' . $langs->trans("DiscountQtyMin") . '</td>';
                print '<td><input class="flat" name="remise_percent" size="4" value="' . (GETPOST('remise_percent') ? vatrate(GETPOST('remise_percent')) : (isset($object->fourn_remise_percent) ? vatrate($object->fourn_remise_percent) : '')) . '"> %';
                print '</td>';
                print '</tr>';
                // Delivery delay in days
                print '<tr>';
                print '<td>' . $langs->trans('NbDaysToDelivery') . '</td>';
                print '<td><input class="flat" name="delivery_time_days" size="4" value="' . ($rowid ? $object->delivery_time_days : '') . '">&nbsp;' . $langs->trans('days') . '</td>';
                print '</tr>';
                // Option to define a transport cost on supplier price
                if ($conf->global->PRODUCT_CHARGES) {
                    if (!empty($conf->margin->enabled)) {
Example #3
0
     print '<tr><td>' . $langs->trans("Categories") . '</td><td colspan="3">';
     $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
     print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
     print "</td></tr>";
 }
 print '</table>';
 print '<br>';
 if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
     // We do no show price array on create when multiprices enabled.
     // We must set them on prices tab.
 } else {
     print '<table class="border" width="100%">';
     // Price
     print '<tr><td>' . $langs->trans("SellingPrice") . '</td>';
     print '<td><input name="price" size="10" value="' . $object->price . '">';
     print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
     print '</td></tr>';
     // Min price
     print '<tr><td>' . $langs->trans("MinPrice") . '</td>';
     print '<td><input name="price_min" size="10" value="' . $object->price_min . '">';
     print '</td></tr>';
     // VAT
     print '<tr><td width="20%">' . $langs->trans("VATRate") . '</td><td>';
     print $form->load_tva("tva_tx", -1, $mysoc, '');
     print '</td></tr>';
     print '</table>';
     print '<br>';
 }
 print '<table class="border" width="100%">';
 // Accountancy_code_sell
 print '<tr><td>' . $langs->trans("ProductAccountancySellCode") . '</td>';
							window.location = "' . DOL_URL_ROOT . '/product/dynamic_price/editor.php?id=' . $id . '&tab=fournisseurs&eid=" + $("#eid").attr("value");
						}
						function on_change() {
							if ($("#eid").attr("value") == 0) {
								jQuery("#price_numeric").show();
							} else {
								jQuery("#price_numeric").hide();
							}
						}
					</script>';
                }
                // Price qty min
                print '<tr><td class="fieldrequired">' . $langs->trans("PriceQtyMin") . '</td>';
                print '<td><input class="flat" name="price" size="8" value="' . (GETPOST('price') ? price(GETPOST('price')) : (isset($product->fourn_price) ? price($product->fourn_price) : '')) . '">';
                print '&nbsp;';
                print $form->selectPriceBaseType(GETPOST('price_base_type') ? GETPOST('price_base_type') : $product->price_base_type, "price_base_type");
                print '</td></tr>';
                // Discount qty min
                print '<tr><td>' . $langs->trans("DiscountQtyMin") . '</td>';
                print '<td><input class="flat" name="remise_percent" size="4" value="' . (GETPOST('remise_percent') ? vatrate(GETPOST('remise_percent')) : (isset($product->fourn_remise_percent) ? vatrate($product->fourn_remise_percent) : '')) . '"> %';
                print '</td>';
                print '</tr>';
                // Delai livraison jours
                print '<tr>';
                print '<td>' . $langs->trans('NbDaysToDelivery') . '</td>';
                print '<td><input class="flat" name="delivery_time_days" size="4" value="' . ($rowid ? $product->delivery_time_days : '') . '">&nbsp;' . $langs->trans('days') . '</td>';
                print '</tr>';
                // Charges ????
                if ($conf->global->PRODUCT_CHARGES) {
                    if (!empty($conf->margin->enabled)) {
                        print '<tr>';
Example #5
0
 print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">';
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="action" value="update_price">';
 print '<input type="hidden" name="id" value="' . $object->id . '">';
 dol_fiche_head('');
 print '<table class="border" width="100%">';
 // VAT
 print '<tr><td>' . $langs->trans("VATRate") . '</td><td>';
 print $form->load_tva("tva_tx", $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr);
 print '</td></tr>';
 // Price base
 print '<tr><td width="15%">';
 print $langs->trans('PriceBase');
 print '</td>';
 print '<td>';
 print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
 print '</td>';
 print '</tr>';
 // Only show price mode and expression selector if module is enabled
 if (!empty($conf->dynamicprices->enabled)) {
     // Price mode selector
     print '<tr><td>' . $langs->trans("PriceMode") . '</td><td>';
     $price_expression = new PriceExpression($db);
     $price_expression_list = array(0 => $langs->trans("PriceNumeric"));
     //Put the numeric mode as first option
     foreach ($price_expression->list_price_expression() as $entry) {
         $price_expression_list[$entry->id] = $entry->title;
     }
     $price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_price_expression ? $object->fk_price_expression : '0');
     print $form->selectarray('eid', $price_expression_list, $price_expression_preselection);
     print '&nbsp; <div id="expression_editor" class="button">' . $langs->trans("PriceExpressionEditor") . '</div>';
Example #6
0
		dol_fiche_head('');
		
		print '<table class="border" width="100%">';

		// VAT
		print '<tr><td>' . $langs->trans("VATRate") . '</td><td colspan="2">';
		print $form->load_tva("tva_tx", $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr);
		print '</td></tr>';

		// Price base
		print '<tr><td width="20%">';
		print $langs->trans('PriceBase');
		print '</td>';
		print '<td colspan="2">';
		print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
		print '</td>';
		print '</tr>';

 		// Only show price mode and expression selector if module is enabled
		if (! empty($conf->dynamicprices->enabled)) {
			// Price mode selector
			print '<tr><td>'.$langs->trans("PriceMode").'</td><td colspan="2">';
			$price_expression = new PriceExpression($db);
			$price_expression_list = array(0 => $langs->trans("PriceNumeric")); //Put the numeric mode as first option
			foreach ($price_expression->list_price_expression() as $entry) {
				$price_expression_list[$entry->id] = $entry->title;
			}
			$price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_price_expression ? $object->fk_price_expression : '0');
			print $form->selectarray('eid', $price_expression_list, $price_expression_preselection);
			print '&nbsp; <div id="expression_editor" class="button">'.$langs->trans("PriceExpressionEditor").'</div>';
						}
						function on_change() {
							if ($("#eid").val() == 0) {
								jQuery("#price_numeric").show();
							} else {
								jQuery("#price_numeric").hide();
							}
						}
					</script>';
				}

				// Price qty min
				print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMin").'</td>';
				print '<td><input class="flat" name="price" size="8" value="'.(GETPOST('price')?price(GETPOST('price')):(isset($object->fourn_price)?price($object->fourn_price):'')).'">';
				print '&nbsp;';
				print $form->selectPriceBaseType((GETPOST('price_base_type')?GETPOST('price_base_type'):'HT'), "price_base_type");  // We keep 'HT' here, price_base_type is not yet supported for supplier prices
				print '</td></tr>';

				// Discount qty min
				print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>';
				print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOST('remise_percent')?vatrate(GETPOST('remise_percent')):(isset($object->fourn_remise_percent)?vatrate($object->fourn_remise_percent):'')).'"> %';
				print '</td>';
				print '</tr>';

				// Delivery delay in days
				print '<tr>';
				print '<td>'.$langs->trans('NbDaysToDelivery').'</td>';
				print '<td><input class="flat" name="delivery_time_days" size="4" value="'.($rowid ? $object->delivery_time_days : '').'">&nbsp;'.$langs->trans('days').'</td>';
				print '</tr>';

				// Option to define a transport cost on supplier price