⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Stock input



carugnom

carugnom
  • profile picture
  • Member

Posted 01 February 2015 - 14:26 PM

Hi !

I'm new to this forum, my name is Mario.

I'm using GC and it really is a great help, thanks to it's developers !

Now I face something that I don't know how to solve.

I want to create a module for stock input.

I input stock through a Dispatch Note.

So I can have 3 tables to use with a 'set_relation_n_n' function:

 

- dispnote

- product

- dispnote_product

 

with this elements GC draws the widget to assign several products to one dispatch note.

But I need to input product quantities in order to update the stock.

 

How can achieve this ? Can I do that with the same relational widget or must I do it from scratch ?

 

Thanks & regards !


carugnom

carugnom
  • profile picture
  • Member

Posted 01 February 2015 - 16:53 PM

Searching about it, what I need is something like xCRUD's nested tables functionality

 

http://codecanyon.net/item/xcrud-data-management-system-php-crud/full_screen_preview/3215400

 

Is there some like that in GC ?


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 02 February 2015 - 05:24 AM

no technically .. currently GC dose not support the same... but what you can do is.. use javascript to keep adding the products and their quantities manually (on click of some button).

 

You can check this code out -

/topic/2707-a-multi-multiupload/

 

this is going to help you dynamically be able to generate  the form elements on click of a button ...

 

and when u click on save - u will need to write a pre-insert hook and post insert hook to manage the newly  inserted entries!!


carugnom

carugnom
  • profile picture
  • Member

Posted 02 February 2015 - 10:20 AM

Well, I've found this 

 

/topic/77-multi-list-hack-chaining-crud-forms-together/

 

think I can relate a inner CRUD in the record's edit window.

That inner CRUD must filter records to show only those with the parent's id

Got to try it, then I tell you if worked

Thanks !