Register    Login    Forum    Search    FAQ

Board index » General Usage » Receivables




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Unlock Unit Price in POS
 Post Posted: Thu Jan 19, 2012 11:03 pm 
Offline

Joined: Thu Feb 18, 2010 1:23 am
Posts: 17
Hello Dave,

Can I unlock Unit Price in POS module like on Invoice? If I can, can you tell me how?
Thanks in advance.

krl


Top 
 Profile  
 
 Post subject: Re: Unlock Unit Price in POS
 Post Posted: Sat Jan 21, 2012 11:53 am 
Offline

Joined: Fri Oct 26, 2007 3:55 pm
Posts: 3499
Location: Colorado, US
I haven't tried it but you should be able to edit the POS module to make the Unit Price field entry NOT be read only (which is the current setting). It's hard coded into the form to prevent employees from changing the price at will. The field is generated in the JavaScript loaded with the main page.

Dave


Top 
 Profile  
 
 Post subject: Re: Unlock Unit Price in POS
 Post Posted: Tue Jan 31, 2012 12:33 pm 
Offline

Joined: Mon Mar 01, 2010 5:32 am
Posts: 554
Location: Netherlands
You should make a file in the directory
Phreepos/custom/pages/main/extra_js.php
If you past the code below in this file it should work.
i have removed the readonly from the inputbox named 'price_'

Code:
<?php

//  Path: /modules/phreepos/custom/pages/main/extra_js.php
//

?>
<script type="text/javascript">

function addInvRow() {
  var newCell;
  var cell;
  var newRow = document.getElementById('item_table').insertRow(-1);
  var rowCnt = newRow.rowIndex;
  // NOTE: any change here also need to be made to template form for reload if action fails
  cell  = '<td align="center">';
  cell += buildIcon(icon_path+'16x16/emblems/emblem-unreadable.png', image_delete_text, 'onclick="if (confirm(\''+image_delete_msg+'\')) removeInvRow('+rowCnt+');"') + '</td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td nowrap="nowrap" class="main" align="center"><input type="text" name="pstd_'+rowCnt+'" id="pstd_'+rowCnt+'" size="7" maxlength="6" onchange="updateRowTotal('+rowCnt+', true)" style="text-align:right" />';
  cell += '&nbsp;' + buildIcon(icon_path+'16x16/actions/tab-new.png', image_ser_num, 'onclick="serialList(\'serial_'+rowCnt+'\')"');
  cell += '</td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td nowrap="nowrap" class="main" align="center"><input type="text" name="sku_'+rowCnt+'" id="sku_'+rowCnt+'" readonly="readonly" size="'+(max_sku_len+1)+'" maxlength="'+max_sku_len+'"  />&nbsp;';
  cell += buildIcon(icon_path+'16x16/actions/document-properties.png', text_properties, 'id="sku_prop_'+rowCnt+'" align="top" style="cursor:pointer" onclick="InventoryProp('+rowCnt+')"');
  cell += '</td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell = '<td class="main"><input name="desc_'+rowCnt+'" id="desc_'+rowCnt+'" readonly="readonly" size="50" maxlength="255" /></td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td nowrap="nowrap" class="main" align="center"><input type="text" name="price_'+rowCnt+'" id="price_'+rowCnt+'" size="10" maxlength="15" style="text-align:right" /></td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td class="main" align="center">';
// Hidden fields
  cell += '<input type="hidden" name="id_'+rowCnt+'" id="id_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="stock_'+rowCnt+'" id="stock_'+rowCnt+'" value="NA" />';
  cell += '<input type="hidden" name="inactive_'+rowCnt+'" id="inactive_'+rowCnt+'" value="0" />';
  cell += '<input type="hidden" name="serial_'+rowCnt+'" id="serial_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="full_'+rowCnt+'" id="full_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="disc_'+rowCnt+'" id="disc_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="acct_'+rowCnt+'" id="acct_'+rowCnt+'" value="'+default_inv_acct+'" />';
  cell += '<input type="hidden" name="tax_'+rowCnt+'" id="tax_'+rowCnt+'" value="" />';
// End hidden fields
  cell += '<input type="text" name="total_'+rowCnt+'" id="total_'+rowCnt+'" value="'+formatted_zero+'" readonly="readonly" size="11" maxlength="20" style="text-align:right" /></td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  return rowCnt;
}
</script>

_________________
Rene Kervezee


Top 
 Profile  
 
 Post subject: Re: Unlock Unit Price in POS
 Post Posted: Wed Feb 01, 2012 11:54 pm 
Offline

Joined: Thu Feb 18, 2010 1:23 am
Posts: 17
Thanks for the Replies Dave & Rene..

Unlock the Unit Price is works, but the Amount or the Subtotal doesn't change.
Can you help me again on this?
Thanks in advance.

krl


Top 
 Profile  
 
 Post subject: Re: Unlock Unit Price in POS
 Post Posted: Thu Feb 02, 2012 1:38 am 
Offline

Joined: Mon Mar 01, 2010 5:32 am
Posts: 554
Location: Netherlands
this should do the trick.

Code:
<?php

//  Path: /modules/phreepos/custom/pages/main/extra_js.php
//

?>
<script type="text/javascript">

function addInvRow() {
  var newCell;
  var cell;
  var newRow = document.getElementById('item_table').insertRow(-1);
  var rowCnt = newRow.rowIndex;
  // NOTE: any change here also need to be made to template form for reload if action fails
  cell  = '<td align="center">';
  cell += buildIcon(icon_path+'16x16/emblems/emblem-unreadable.png', image_delete_text, 'onclick="if (confirm(\''+image_delete_msg+'\')) removeInvRow('+rowCnt+');"') + '</td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td nowrap="nowrap" class="main" align="center"><input type="text" name="pstd_'+rowCnt+'" id="pstd_'+rowCnt+'" size="7" maxlength="6" onchange="updateRowTotal('+rowCnt+', true)" style="text-align:right" />';
  cell += '&nbsp;' + buildIcon(icon_path+'16x16/actions/tab-new.png', image_ser_num, 'onclick="serialList(\'serial_'+rowCnt+'\')"');
  cell += '</td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td nowrap="nowrap" class="main" align="center"><input type="text" name="sku_'+rowCnt+'" id="sku_'+rowCnt+'" readonly="readonly" size="'+(max_sku_len+1)+'" maxlength="'+max_sku_len+'"  />&nbsp;';
  cell += buildIcon(icon_path+'16x16/actions/document-properties.png', text_properties, 'id="sku_prop_'+rowCnt+'" align="top" style="cursor:pointer" onclick="InventoryProp('+rowCnt+')"');
  cell += '</td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell = '<td class="main"><input name="desc_'+rowCnt+'" id="desc_'+rowCnt+'" readonly="readonly" size="50" maxlength="255" /></td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td nowrap="nowrap" class="main" align="center"><input type="text" name="price_'+rowCnt+'" id="price_'+rowCnt+'" size="10" maxlength="15" style="text-align:right"  onchange="updateRowTotal('+rowCnt+', true)" /></td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  cell  = '<td class="main" align="center">';
// Hidden fields
  cell += '<input type="hidden" name="id_'+rowCnt+'" id="id_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="stock_'+rowCnt+'" id="stock_'+rowCnt+'" value="NA" />';
  cell += '<input type="hidden" name="inactive_'+rowCnt+'" id="inactive_'+rowCnt+'" value="0" />';
  cell += '<input type="hidden" name="serial_'+rowCnt+'" id="serial_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="full_'+rowCnt+'" id="full_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="disc_'+rowCnt+'" id="disc_'+rowCnt+'" value="" />';
  cell += '<input type="hidden" name="acct_'+rowCnt+'" id="acct_'+rowCnt+'" value="'+default_inv_acct+'" />';
  cell += '<input type="hidden" name="tax_'+rowCnt+'" id="tax_'+rowCnt+'" value="" />';
// End hidden fields
  cell += '<input type="text" name="total_'+rowCnt+'" id="total_'+rowCnt+'" value="'+formatted_zero+'" readonly="readonly" size="11" maxlength="20" style="text-align:right" /></td>';
  newCell = newRow.insertCell(-1);
  newCell.innerHTML = cell;
  return rowCnt;
}
</script>

_________________
Rene Kervezee


Top 
 Profile  
 
 Post subject: Re: Unlock Unit Price in POS
 Post Posted: Sun Feb 12, 2012 6:13 pm 
Offline

Joined: Thu Feb 18, 2010 1:23 am
Posts: 17
Thanks Rene for your help...

krl


Top 
 Profile  
 
 Post subject: Re: Unlock Unit Price in POS
 Post Posted: Mon Jun 11, 2012 1:34 pm 
Offline

Joined: Mon Nov 09, 2009 1:18 pm
Posts: 296
yip it wrks


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 7 posts ] 

Board index » General Usage » Receivables


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: