Lots of background:
I visited the US several times since 2014, and in November 2015 I entered the country as a J-1 research scholar. I left the US again by November 2017. By the substantial presence test, I was considered a non-resident for 2015 and 2016 for federal tax purposes, but for the 2017 filing, I was considered a resident alien. Thus, for the purpose of federal tax, I am filing a form 1040 for 2017. Since all my W-2 income is exempt from federal taxes due to a tax treaty (1042-S income), I have zero in box 1 of my W-2 (state wages only). According to the instructions I have found, I should nevertheless report my entire 1042-S wages in box 7 on form 1040, and report the exempt amount as a negative income in box 21 on the same form, adding that this is an exempt amount, and give the treaty article.
I permanently left the US, and California in November 2017, so according to the guidelines, I should file my state taxes as a part-time resident in CA. I'm rather confused as to how I should fill part II of the CA Schedule CA (540NR).
In column A, for the lines 7-21 I get the impression that I should essentially just copy exactly what I have in my federal return for the same lines. Which adds up to zero, for the wages, plus some interest from my savings. For column B, I have no subtractions.
For column C, however, the confusion starts. According to the Schedule CA instructions, I should add my 1042-S wages in line 7 of column C, but only if I excluded it from my federal tax return (which I didn't), so I have not added these wages in that line.
Carrying this over to column D, that gives a grand total slightly above zero (essentially only the bank interest). My 1042-S wages (which is state income, according to my W-2, box 16) then goes to column E, line 7.
Now transferring all this info to the form 540NR long, my AGI in line 17 becomes essentially just the bank interest, and my total taxable income in line 19 becomes less than zero once I subtract the standard deduction. That means that my tax in line 31 becomes zero too, even though I have a substantial CA taxable income, according to Schedule CA (540NR) part IV line 49. This all adds up to having zero tax when I carry out the computations in form 540NR, but I had tax withheld all year. The past two years I also paid state tax in CA and did end up getting a small refund, but hardly the entire amount I paid. I am quite certain that I have made a mistake somewhere, since the only thing that has changed from previous years is that I am now a resident for federal purposes, and thus I see no reason why I should not pay state taxes also for 2017.
That was all the background. Now for the actual question:
Should I add my 1042-S wages in line 7 column C on Schedule CA 540NR, even though I reported those wages also on my federal return?
Then the wages in column D line 7 becomes essentially twice my income (adjusted back to my actual income, if I carry over the "negative income" I put in line 21 due to the tax treaty exemption, though). If I do this, when I transfer all to form 540NR long, I end up with essentially what I'd expect, based on previous years filings, but strictly speaking, that's not what the Schedule CA instructions say.