I created 2 fields in InventLocation Table with EDT Numbersequencecode.
Added in the form… Inventory Management >>Setup>> InvetoryBreakdown>>Warehouses tab >> In new tab 1.sales packing slip no 2.Sales invoice no
Then I created Number sequence for some warehouses manually by right click on field >>view details page… for both salesPacking slip no and Sales Invoice no field.
Now I want number sequence for packing slip and invoice no for posting Sales order if I select that particular warehouse in header which I created number sequence manually.
I know that I need to write code in Salespackingslipjournalcreate and salesinvoicejournalcreate classes. But I am unable to write the code…
The default logic determining number sequences is located in SalesInvoiceJournalCreateBase,allocateNumAndVoucher() and SalesPackingSlipJournalCreate.allocateNumAndVoucher().
You have to find the warehouse for the order header - that’s in salesTable.InventLocationId. Then you have to take a value from your field. You have to decide what to do if it’s empty. Then use the value at appropriate places in those methods (depending on your requirements regarding priority of this selection logic).