Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. true i can always use update.. how can i auto increment a field starting from 1.. and if you delete the product it needs to reset the fields..cause if i delete the order 3 there will be missing a 3 in the order..
  2. can you correct this? $num= $_POST['num']; $CheckNum = mysql_query("SELECT Order from Products WHERE Order = '$num'"); while($test = mysql_fetch_array($CheckNum)) if ($test ) { echo "Is not valide"; }
  3. there should be a way to warn before he submits?cause if he makes like 3 errors it can take a long time to add a single product.. maybe a select box that shows only the numbers not taken?
  4. but how can i warn the user ?
  5. Hey guy's i made a small catalog style for my body's shop,in the admin he inserts and deletes products. but he would like to order the products the way he wants to,not by Id or ASC desc... so i added a field order inserts 1 to 10 lets say. so how can i do it so first there is not replicates and second when i do my query how can i make it order by numbering 1 to 10..
  6. the textare is for a dealership script im doing for my body..just to add cars.. see,so i would change the class for WSYIWYG?but then the others? <code> <label>SHORT DESCRITION</label> <textarea name="Description_short" cols="55" rows="4" class="text-input textarea" ></textarea> <label>SHORT FR</label> <textarea name="Description_short_FR" cols="55" rows="4" class="text-input textarea" ></textarea> <label>FULL DESCRIPTION</label> <textarea name="Description_long" cols="55" rows="6" class="text-input textarea" ></textarea> <label>FULL DESCRIPTION FR</label> <textarea name="Description_long_FR" cols="55" rows="6" class="text-input textarea" ></textarea> </code>
  7. Hey guys,i noticed that when i try to add more then one ID:wysiwyg on my textarea it only works on one.. is there a way to have lets say 3 wysiwyg textarea?? do i need to add a class wysiwyg2 wysiwyg3....
  8. hey guys i have this invoice im working on but my clients want's the invoice id start at a specific number? do it put that number in phpmyadmin direct on the line null?or can i do it another way?
  9. im going to post my code.it's in a for.. <form id="submit_form" action="ADD.php" method="post" > SUB ::<span id="small_total"></span><br /> TPS :: <span id="tps"></span><br /> TVQ :: <span id="tvq"></span><br /> GRAND TOTAL :: <span id="grand_total"></span><br /> <div class="action_bar"> <input type="submit" name="submit" /> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="42%">PRODUCT</td> <td width="11%">QTY</td> <td width="10%">PRICE</td> <td width="37%">TOTAL</td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj1"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty1"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price1"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj2"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty2"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price2"></p></td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj3"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty3"> </p></td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price3"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"> <input type="text" id="street" class="item_title" name="obj4"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty4"> </p></td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price4"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj5"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty5"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price5"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj6"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty6"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price6"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj7"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty7"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price7"></p> </td> <td><span class="item_small_total"></span></td> </tr> </table> </form>
  10. Hey guys i got an invoice form that has the totals in a span id SUB ::<span id="small_total"></span><br /> TPS :: <span id="tps"></span><br /> TVQ :: <span id="tvq"></span><br /> GRAND TOTAL :: <span id="grand_total"></span><br /> so its part of a form,when i submit to add to databse i can't seem to figure out how to get the values of the id? i have tried a few things with no success.. exp in the add.php page(form submit action) $GT = "<script language='javascript'>document.getElementById(grand_total);</script>";
  11. ok i think i got it. $q1 = "UPDATE si_invoice_items SET tax1 =(SELECT ROUND(SUM(unit_price* $TAX1/100),2))"; $res1 = mysql_query($q1); $row3 = mysql_fetch_assoc($res1); $q2 = "UPDATE si_invoice_items SET tax2 = (SELECT ROUND(SUM(unit_price* $TAX2/100),2))"; $res2 = mysql_query($q2); $row2 = mysql_fetch_assoc($res2);
  12. hey guys i have a complex code that i would like to automate.. So i modified an invoice program(simple invoices) for Quebec Taxes. added 2 columns in database si_invoice_items tax1 and tax1 so in that database there is a field called unit_price so what i did is set up a query that calculates the taxes on that column unit_price and inserts in calumn tax1 TPS and tax2 TVQ so that part is fine but the only way i seen to do it is to make a table and echo the database si_invoice_items and put a button (convert to QC tax)so when you press it executes the querry: but my issue is is that im running the query from a specific id is there a way to make the query go true all the rows and convert?then i can set up a CRON job to excute it every hour or so.. TAX1=5.00; $TAX2 =9.975; $id=$_GET['id']; $q1 = "SELECT SUM(unit_price) AS TotalPrice FROM `si_invoice_items` where `invoice_id`= $id"; $res1 = mysql_query($q1); $row3 = mysql_fetch_assoc($res1); $TotalItems=$row3['TotalPrice']; $subtotal = ($TotalItems * $TAX1/100) ; $subtotal2 = ($TotalItems * $TAX2/100) ; $price3 = $TotalItems + $subtotal + $subtotal2; $total= round($price3, 2); $taxt1=round($subtotal, 2); $taxt2=round($subtotal2, 2); $TotalItems2=round($TotalItems, 2); mysql_query("UPDATE `si_invoice_items` SET `tax1` = $taxt1, `tax2` = $taxt2 WHERE `invoice_id` = $id");
  13. lol i settle it..uhh but still don't understand all of it.. $inv = $i->getResultsWhere('order by itemCode DESC LIMIT 0, 1 '); changed the limit... {foreach from=$inv item=itemCode} <td class="responsive">{$itemCode->itemCode}</td> <td class="responsive">{$itemCode->itemDesc}</td> <td class="responsive">{$itemCode->qtyOnHand}</td> <td class="responsive">${$itemCode->itemRetail}</td> this? if im correct from $inv is the query the you associate it to item that becomes $itemcode
  14. ok so with the second code i figured out part {foreach from=$inv item=itemCode} <tr class="responsive"> <td class="responsive">{$itemCode->itemCode}</td> <td class="responsive"></td> <td class="responsive">{$inv->date|date_format}</td> <td class="responsive">${$rows_returned}</td> <td class="responsive"> works but i only get one how can i show all??
  15. hey guys i have this code to grab info from database in my inv.php file $dbConn = new DBConnection(); $i = new dbHandler($dbConn, 'inventory'); $inv = array(); $sel=mysql_query("select * from inventory"); while($row=mysql_fetch_array($sel)) { $inv[] = $row; } $smarty->assign('inventory', $inv); // Finally, display the actual page $smarty->display('InvViewAdd.tpl'); How to i make it show the info on my InvViewAdd .tpl page? also if i put $inv = $i->showInv(); $smarty->assign('inv', $inv); from my class page: public function showInv() { $dbConn = new DBConnection(); $i = new dbHandler($dbConn, 'inventory'); $inv = $i->getResultsWhere('order by itemCode DESC LIMIT 0, 1 '); return $inv; } i get this,i see it works but can't output {foreach from=$inv item=itemCode} <tr class="responsive"> <td class="responsive">{$inv[0]}</td> <td class="responsive">$inventory</td> <td class="responsive">{$inv->date|date_format}</td> <td class="responsive">${$rows_returned}</td> <td class="responsive"> $SCRIPT_NAME Smarty_Variable Object (3) ->value = "/TEST/Inv.php" ->nocache = false ->scope = "file:InvViewAdd.tpl" $inv Smarty_Variable Object (3) ->value = Array (1) 0 => stdClass Object (7) ->id = "13" ->itemCode = "299945844554" ->qtyOnHand = "5" ->itemDesc = "kenwood DDH-5342" ->itemPrice = "299.99" ->itemRetail = "599.99" ->itemWholesale = "" ->nocache = false ->scope = "file:InvViewAdd.tpl" $smarty Smarty_Variable Object (3) ->value = null ->nocache = false ->scope = "file:InvViewAdd.tpl"
  16. its from barcodephp.com. its pre done.i was testing it out.
  17. Hey guys im using the barcodephp.com codes and it seems complete but i get ‰PNG IHDRÊRš2ÜÑLtEXtCopyrightGenerated with Barcode Generator for PHP http://www.barcodephp.comYp¸¡IDATxœíÚ_HSoÇñÏÆá8eè ‰!!3¦²¢äGF"#"dIx!"â•z" Ñ¥,ñRt„ˆD!rˆðBdXˆcèQËó»xhŒ5³¯ÿöy]ÙsžãγޜmÏt ƒišGúgEXgfÍ<×ÊîhþG´ž•9'Sþk(üÚò?b!ÏCá¿9ÿþçŸiw…ùŸI»9']£3çcýÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ļHó"AÌ‹1/ä0M󼯮,Þ½Hó"AÌ‹1¯?r8ß¾}Ëyt{{{ppðÖ­[¥¥¥÷îÝ{óæͯ_¿²¦ÍÌÌ´´´TTT”””444ŒÊ_û`’=Ã0t]°ººj=º¶¶V]] Àår›7oª§4¦R©ô´¾¾>5îóù€Ëåà÷û‰Ä.å|0/[†aTVVª2ræÕÔÔàÉ“';;;jäË—/×®]0<<¬F¦§§¸Ýî?ª‘x<~çÎg³sļrW÷-»¼TWWdŽG"UUUêŸÍÍÍFGG3çD£Qš¦íí퉮âÜñ½W·oßîïï?>>·›£òjkk+--̓‰Äææ&€ƒÁgÏžeΩ¯¯J¥b±˜Äõ_ çÝ÷ÙYXXèêêòù|eeeš¦]¿~= †a Àï÷ýúÕü½çl½{­¯¯OMM-..f' uÊÆƆݕ†ÀåríïïŸzYZ±äõòåKõ¿îõzïÞ½ë÷û5Màt:çææ²&ONN¦ß›Ûåegbb@yyy2™Ì9Á0ŒÚÚZ½œË¢(òZZZ ëú‡Òƒñxüþýûšššòœ{¢¼vww½^/€®®.ëÑÇ×ÔÔÐ4íÅ‹™Ÿ.¯ª¢ÈkddD×õþþþ¬ñOŸ>©©<çžW2™lkkPVV–ó•QÝ/•ææ楥¥­â2*Š¼ë«•z{žÿ hy¥R©P(¤&OMMåœðãÇd2F=zÀívÿþý¤«¸\Š+¯………p8<00ÐÞÞîóù ù|SH^ª¯_¿þ㕤R)õº …N¼ŒK¥Xòš˜˜¨ªªJ÷¤iZcccggçéóÚÙÙQ›[¶¥ÌÎÎ"c{ìª*Š¼&''Õ[û¾¾¾éééh4ªöBWVVN™W<÷ûýêèÛ·o­b±˜ÚàȲ¼¼¬.é¯tiE^j3g¿ÿþ4yííí566ªJ"‘ˆuÂúúº*okk+ëÐÜÜ€ÚÚÚ.å’)Š]û @ k\íQ°þC!º»»£Ñ¨®ëïÞ½{úô©uB]]×ë=>>N?PZ8Æï-þ«ì¼û>êÓÑÑqtt¤F¶¶¶zzzÒOBžïþÔëÝk~~^Êùš˜¦¾Vr¹\³³³jd_ý EeeåÏŸ?O·²‹®(òšŸŸw:<OzË^Ó´‘‘Ç Ï]^­­­œNç6Ò[_½½½ê—ܸq#¸ÝnÕVÎ˜¢ÈË4ÍÏŸ?·¶¶z<]×kjjº»»WVVLÓT¡¯^½²;Ñ./UI™§D"‘‡–——ëºîóùž?‹Å„Vz¡ü°Ö,\’Ò!óIEND®B`‚ seems like en encoding issue?
  18. thx for the reply.sorry about the nob error.. when i add this to the page it works but the previous code does not? <script> $(document).ready(function(){ $('#calx').calx({ autocalculate: false }); $('#calculate').click(function(){ $('#calx').calx('update'); }); $("#P1").autocomplete("autocomplete.php", { selectFirst: true }); $("#P2").autocomplete("autocomplete.php", { selectFirst: true }); $("#P3").autocomplete("autocomplete.php", { selectFirst: true }); $("#P4").autocomplete("autocomplete.php", { selectFirst: true }); $("#P5").autocomplete("autocomplete.php", { selectFirst: true }); $("#P6").autocomplete("autocomplete.php", { selectFirst: true }); $("#P7").autocomplete("autocomplete.php", { selectFirst: true }); }); </script>
  19. hey guys i have this invoice script im doing for my friend and it works until i add the auto suggest function that includes the jquery.js why is it that when i combine different java scripts it cancel's out another?should i separate all my scripts in different pages and include them?? so basic <html debug="true"> <head> <title></title> <script type="text/javascript" src="jquery-1.9.1.min.js"></script> <script type="text/javascript" src="jquery-calx-1.1.4.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#calx').calx({ autocalculate: false }); $('#calculate').click(function(){ $('#calx').calx('update'); }); }); </script> <style> input[type="text"]{ width:100%; } td{ padding:5px 10px; } </style> </head> <body> <form id="calx"> <table> <thead> <tr> <td width="268" style="width:250px">Item Name</td> <td width="162" style="width:80px">Price</td> <td width="162" style="width:30px">Qty</td> <td width="168" style="width:150px">Sub Total</td> </tr> </thead> <tbody> <tr> <td><input id="item1" type="text" name="item[]" value=""/></td> <td><input id="price1" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty1" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal1" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price1*$qty1)" /></td> </tr> <tr> <td><input id="item2" type="text" name="item[]" value="" /></td> <td><input id="price2" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty2" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal2" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price2*$qty2)" /></td> </tr> <tr> <td><input id="item3" type="text" name="item[]" value="" /></td> <td><input id="price3" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty3" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal3" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price3*$qty3)" /></td> </tr> <tr> <td><input id="item4" type="text" name="item[]" value="" /></td> <td><input id="price4" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty4" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal4" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price4*$qty4)" /></td> </tr> <tr> <td><input id="item5" type="text" name="item[]" value="" /></td> <td><input id="price5" type="text" name="price[]" value="" data-format="$ 0,0[.]00" /></td> <td><input id="qty5" type="text" name="qty[]" value="" data-format="0" /></td> <td><input id="subtotal5" type="text" name="subtotal[]" value="" data-format="$ 0,0[.]00" data-formula="($price5*$qty5)" /></td> </tr> <tr> <td height="39"> </td> <td>Total Price : </td> <td colspan="2"><input id="total" type="text" name="total" value="" data-format="$ 0,0[.]00" data-formula="($subtotal1+$subtotal2+$subtotal3+$subtotal4+$subtotal5)" /></td> </tr> <tr> <td height="29"> </td> <td>Tax1:</td> <td colspan="2"><input id="totaltax1" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*5.00/100))" /></td> </tr> <tr> <td height="29"> </td> <td>Tax2:</td> <td colspan="2"><input id="totaltax2" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*9.975/100))" /></td> </tr> <tr> <td height="42"><input id="calculate" type="button" value="calculate" /></td> <td>Tax in :</td> <td colspan="2"><input id="totaltax" type="text" name="totaltax" value="" data-format="$ 0,0[.]00" data-formula="($total+($total*5.00/100+$total*9.975/100))" /></td> </tr> </tbody> </table> </form> </body> </html>
  20. well it is just part of the form. but it is just that part i need to display.. i have a field upc code,so i won't to onblur refresh but show the upc from the text field in the url so my query can grab it and search the database for the corresponding product mylink.com?upc=
  21. hey guys i need to refresh on blur to get to post the upc code inserted in the textarea for product search.. i got the but i can't find the way to post the item <script> function reload() { window.location.assign("http://store.radioauto.ca/POS/auto.php?Item=upc code here") } </script> <input type="text" id="upc" name="upc" onblur="reload()" value="<?=$_GET['item']?>"/>
  22. is there a tutorial on how to make a form that when i scan it updates the field with the product info from database?im making a POS system for my body's store..
  23. i got it going with this $TAX1=5.00;$TAX2 =9.974;///this is suppose to be 9.975 but i get a penny more..so i doped it a penny and im ok.. $price1 = ($price * $TAX1/100) ;$price2 = ($price * $TAX2/100) ;$price3 = $price + $price1 + $price2; $total1= round($price1, 2);$total2= round($price2, 2);$total= round($price3, 2);
  24. hey guys can i get some help in putting this in php ? i need to calculate taxes but in quebec...so 2 taxes exapl SUBTOTAL 3.99 TAX1: 18% TAX2: 15% Calculating when Compound tax is enabled: Amount with Compound tax = (SUBTOTAL + TAX1) + TAX2 in digits: (SUBTOTAL + TAX1) = 3.99 + 18% = 3.99 + 3.99 / 100 * 18 = 3.99 * 1.18 = 4.7082 (SUBTOTAL + TAX1) + TAX2 = 4.7082 + 15% = 4.7082 + 4.7082 / 100 * 15 = 4.7082 + 0.70623 = 4.7082 * 1.15 = 5.41443 Amount with Compound tax = 5.41443
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.