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->select_PriceBaseType($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
				print '<td>';
				$quantity = $_REQUEST["qty"] ? $_REQUEST["qty"] : "1";
				if ($_GET["rowid"])
				{
					print '<input type="hidden" name="qty" value="'.$product->fourn_qty.'">';
					print $product->fourn_qty;
				}
				else
				{
					print '<input class="flat" name="qty" size="5" value="'.$quantity.'">';
				}
				print '</td>';
				print '<td>'.$langs->trans("PriceQtyMin").'</td>';
				print '<td><input class="flat" name="price" size="8" value="'.($_POST["price"]?$_POST["price"]:price($product->fourn_price)).'">';
				print '&nbsp;';
				print $html->select_PriceBaseType(($_POST["price_base_type"]?$_POST["price_base_type"]:$product->price_base_type), "price_base_type");
                print '</td>';
				print '</tr>';

				print '<tr><td colspan="4" align="center"><input class="button" type="submit" value="'.$langs->trans("Save").'">';
				print '&nbsp; &nbsp;';
				print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';

				print '</form>';
				print '</table>';
			}

			/* ************************************************************************** */
			/*                                                                            */
			/* Barre d'action                                                             */
			/*                                                                            */
Example #3
0
		print '<br>';

		if ($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%">';

			// PRIX
			print '<tr><td>'.$langs->trans("SellingPrice").'</td>';
			print '<td><input name="price" size="10" value="'.$product->price.'">';
			print $html->select_PriceBaseType($product->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="'.$product->price_min.'">';
			print '</td></tr>';

			// VAT
			print '<tr><td width="20%">'.$langs->trans("VATRate").'</td><td>';
			print $html->load_tva("tva_tx",-1,$mysoc,'');
			print '</td></tr>';

			print '</table>';

			print '<br>';
Example #4
0
				if ($rowid)
				{
					print '<input type="hidden" name="qty" value="'.$product->fourn_qty.'">';
					print $product->fourn_qty;
				}
				else
				{
					print '<input class="flat" name="qty" size="5" value="'.$quantity.'">';
				}
				print '</td>';

				// Price qty min
				print '<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->select_PriceBaseType((GETPOST('price_base_type')?GETPOST('price_base_type'):$product->price_base_type), "price_base_type");
                print '</td>';
				print '</tr>';

				// Charges ????
				if (! empty($conf->margin->enabled))
				{
					print '<tr>';
					print '<td>'.$langs->trans("Charges").'</td>';
					print '<td colspan="3"><input class="flat" name="charges" size="8" value="'.(GETPOST('charges')?price(GETPOST('charges')):(isset($product->fourn_charges)?price($product->fourn_charges):'')).'">';
	        		print '</td>';
					print '</tr>';
				}

				print '</table>';
 if (empty($conf->global->PRODUIT_MULTIPRICES)) {
     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 . '">';
     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->select_PriceBaseType($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 #6
0
		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.'">';
		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->select_PriceBaseType($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).'">';