@@ -52,7 +52,7 @@ function CreateOrder(purchase) {
52
52
* @transaction
53
53
*/
54
54
function Buy ( purchase ) {
55
- if ( purchase . order . status = JSON . stringify ( orderStatus . Created ) )
55
+ if ( purchase . order . status == JSON . stringify ( orderStatus . Created ) )
56
56
{
57
57
purchase . order . buyer = purchase . buyer ;
58
58
purchase . order . seller = purchase . seller ;
@@ -70,7 +70,7 @@ function Buy(purchase) {
70
70
* @transaction
71
71
*/
72
72
function OrderCancel ( purchase ) {
73
- if ( ( purchase . order . status = JSON . stringify ( orderStatus . Created ) ) || ( purchase . order . status = JSON . stringify ( orderStatus . Bought ) ) )
73
+ if ( ( purchase . order . status == JSON . stringify ( orderStatus . Created ) ) || ( purchase . order . status = = JSON . stringify ( orderStatus . Bought ) ) )
74
74
{
75
75
purchase . order . buyer = purchase . buyer ;
76
76
purchase . order . seller = purchase . seller ;
@@ -88,7 +88,7 @@ function OrderCancel(purchase) {
88
88
* @transaction
89
89
*/
90
90
function OrderFromSupplier ( purchase ) {
91
- if ( purchase . order . status = JSON . stringify ( orderStatus . Bought ) )
91
+ if ( purchase . order . status == JSON . stringify ( orderStatus . Bought ) )
92
92
{
93
93
purchase . order . provider = purchase . provider ;
94
94
purchase . order . ordered = new Date ( ) . toISOString ( ) ;
@@ -105,7 +105,7 @@ function OrderFromSupplier(purchase) {
105
105
* @transaction
106
106
*/
107
107
function RequestShipping ( purchase ) {
108
- if ( purchase . order . status = JSON . stringify ( orderStatus . Ordered ) )
108
+ if ( purchase . order . status == JSON . stringify ( orderStatus . Ordered ) )
109
109
{
110
110
purchase . order . shipper = purchase . shipper ;
111
111
purchase . order . requestShipment = new Date ( ) . toISOString ( ) ;
@@ -122,7 +122,7 @@ function RequestShipping(purchase) {
122
122
* @transaction
123
123
*/
124
124
function Delivering ( purchase ) {
125
- if ( ( purchase . order . status = JSON . stringify ( orderStatus . ShipRequest ) ) || ( JSON . parse ( purchase . order . status ) . code = orderStatus . Delivering . code ) )
125
+ if ( ( purchase . order . status == JSON . stringify ( orderStatus . ShipRequest ) ) || ( JSON . parse ( purchase . order . status ) . code = = orderStatus . Delivering . code ) )
126
126
{
127
127
purchase . order . delivering = new Date ( ) . toISOString ( ) ;
128
128
var _status = orderStatus . Delivering ;
@@ -140,7 +140,7 @@ function Delivering(purchase) {
140
140
* @transaction
141
141
*/
142
142
function Deliver ( purchase ) {
143
- if ( ( purchase . order . status = JSON . stringify ( orderStatus . ShipRequest ) ) || ( JSON . parse ( purchase . order . status ) . code = orderStatus . Delivering . code ) )
143
+ if ( ( purchase . order . status == JSON . stringify ( orderStatus . ShipRequest ) ) || ( JSON . parse ( purchase . order . status ) . code = = orderStatus . Delivering . code ) )
144
144
{
145
145
purchase . order . delivered = new Date ( ) . toISOString ( ) ;
146
146
purchase . order . status = JSON . stringify ( orderStatus . Delivered ) ;
0 commit comments