How to stop saving number seq if we click on cancel in posting product receipt in AX2012 R2

Dera All,

I am using Ax 2012R2.

Select a PO and click on Product receipt.

Now click on New i am able to see no seq generated because i manipulated code  like that.

Now click on OK, same no is saving in vendpackingslip our table, that we can see by clicking on productreceipt in journal.

Now cancle product receipt joiurnal  and click on product recipt again this time giving new no seq for product receipt.

Now click on cancel in packing slip form, now click agaiin new in packiing slip this time giving new product receipt no.

My concern is

1.if i click on cancel and click on new again i want to generate old no only, like our new po no.

2.i want to generate packiing slip id the movent we click on packiing slip button.