remove item data in inventory
This commit is contained in:
@@ -57,7 +57,7 @@ class InventoryDefinition < ApplicationRecord
|
|||||||
data.qty = extra_qty
|
data.qty = extra_qty
|
||||||
StockJournal.add_to_journal(data, 0, "out of stock", inventory_definition)
|
StockJournal.add_to_journal(data, 0, "out of stock", inventory_definition)
|
||||||
else
|
else
|
||||||
StockJournal.add_to_journal(item_data, stock.balance, "out of stock", inventory_definition)
|
StockJournal.add_to_journal(item, stock.balance, "out of stock", inventory_definition)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -282,14 +282,14 @@ $(document).ready(function(){
|
|||||||
$('#request_bills').click(function () {
|
$('#request_bills').click(function () {
|
||||||
var order_id = $('#save_order_id').val();
|
var order_id = $('#save_order_id').val();
|
||||||
var ajax_url = "/origami/" +order_id+ "/request_bills";
|
var ajax_url = "/origami/" +order_id+ "/request_bills";
|
||||||
console.log(ajax_url)
|
console.log(ajax_url);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: ajax_url,
|
url: ajax_url,
|
||||||
// data: 'order_id='+ order_id,
|
// data: 'order_id='+ order_id,
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
if (!result.status) {
|
if (!result.status) {
|
||||||
swal("Information!", result.error_message);
|
swal ( "Oops" , result.error_message , "warning" );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
window.location.href = '/origami/sale/'+result.data+'/'+cashier_type+'/payment';
|
window.location.href = '/origami/sale/'+result.data+'/'+cashier_type+'/payment';
|
||||||
|
|||||||
Reference in New Issue
Block a user