Under portuguese labour law, you will receive the payment due until the date you end the contract, meaning the period in wich you efectively work. If you give notice of the contract before the expiration date (in your case, the 12 months), you will only receive payment until the date of the contract notice. However, you have the right to be paied for vacation that you may have not had and respective allowance.